More Related Content
Similar to git, repo, Gerrit 基礎教學
Similar to git, repo, Gerrit 基礎教學 (20)
git, repo, Gerrit 基礎教學
- 3. Code Review
網址 http://review.xxx.com
commit message 要⽤用英⽂文 (因為 Gerrit 不⽀支援中⽂文)。︒
每個 patch 要保持簡短利落,commit message 要包含 JIRA
id(如果有的話),commit message 若需要⽤用比較⼤大的篇幅敘
述,則在 JIRA 補充。︒
只要完成⼀一⼩小部分功能,即可當作⼀一個 patch 上傳,可以讓未
來的 debug 變簡單,⽽而不要實作⼀一堆功能後再⼀一次上傳。︒
- 4. Gerrit 設定
先在 Windows 裝 git
http://blog.crboy.net/2012/05/git-on-windows.html
要先 signup
設定 SSH Public Keys
設定 Username
- 5. SSH Public key 設定(僅供參考)
開啓 Git Bash
ssh-keygen
預設都按 enter
把 C:Users你的⼤大名.sshid_rsa 的內容複製到 Gerrit 網⾴頁
上的 SSH Public key
或可參考 https://help.github.com/articles/generating-ssh-
keys#platform-windows
- 6. Gerrit Q & A
遇到 Permission denied (publickey). 這類的問題,請確認
~/.gitconfig 和 ~/.ssh/config 是否都已設定 User name 和
email:
- 10. 確定要 commit 的檔案可⽤用 git add
綠⾊色代表 git commit 會被 commit 的檔案,紅⾊色代表還沒準備
要 commit (⽤用 git commit -a 則可不管紅綠都會⼀一起 commit)
- 16. Code-review 分數的意義
+2 這個 patch 沒問題,驗證過,可以直接 submit。︒
+1 這個 patch 沒問題,驗證過,但需要其他⼈人幫忙驗證。︒
+0 留⾔言專⽤用。︒
-1 這個 patch 有問題,(不論是否驗證過,可能只是單純
coding style 的問題),請在留⾔言詳述。︒
-2 這個 patch 有問題,⽽而且可能連驗證都無法通過,(例如功能
有錯誤,或是沒有 rebase 等等),此時除非留下 -2 的 reviewer
再重新評分,否則此 patch 無法被 submit。︒