Gerrit                                        Daegeun Kim                              (dani.kim@geekple.com)             ...
Gerrit                       • A Code Review System based on JGit                       • Open source (Apache 2 License)  ...
Review                                          개발            디버그                  Pre-commit Review                      ...
Review                                          개발            디버그                  Pre-commit Review                      ...
Review                                          개발            디버그                  Pre-commit Review                      ...
Review                                          개발            디버그                  Pre-commit Review                      ...
Git standalone                                                            pull/push                            Working   c...
Git and Gerrit                                                                                      Remote Repo           ...
Git, Gerrit and CI                                                                                     Remote Repo        ...
Request for Review                                                                                     Remote Repo        ...
Uploading changes                                 (Simple)                    $ git init                    $ git clone ss...
Uploading changes                                  (Advanced)                    $ git push [alias] HEAD:refs/for/[branch]...
Adding Reviewers                                               Add Reviewer                                   13Thursday,	...
Uploading/Adding Reviewers                                    (Advanced)                    $ git push [alias] --receive-p...
Review and Verify                                                                Remote Repo                              ...
Review                                                                             Remote Repo                            ...
Fetching the changes                                                   copy                                     17Thursday...
Fetching the changes                    $ git fetch http://hostname:port/p/[project]                          refs/changes...
Review                                    (Advanced)                    $ ssh -p [port] [user]@[hostname] gerrit review   ...
Verify                                                                      Remote Repo                                   ...
Verify                                    (Advanced)                    $ ssh -p [port] [user]@[hostname] gerrit review   ...
Q&A                             22Thursday,	 October	 20,
Upcoming SlideShare
Loading in...5
×

Gerrit

3,364

Published on

Git & Gerrit

Gerrit

  1. 1. Gerrit Daegeun Kim (dani.kim@geekple.com) 1Thursday, October 20,
  2. 2. Gerrit • A Code Review System based on JGit • Open source (Apache 2 License) 2Thursday, October 20,
  3. 3. Review 개발 디버그 Pre-commit Review 0 25 50 75 100 3Thursday, October 20,
  4. 4. Review 개발 디버그 Pre-commit Review 0 25 50 75 100 4Thursday, October 20,
  5. 5. Review 개발 디버그 Pre-commit Review 0 25 50 75 100 5Thursday, October 20,
  6. 6. Review 개발 디버그 Pre-commit Review 0 25 50 75 100 6Thursday, October 20,
  7. 7. Git standalone pull/push Working commit Tree Local Repo Remote Repo 7Thursday, October 20,
  8. 8. Git and Gerrit Remote Repo tch p ull/fe Working commit Tree merge pus h fo Local Repo r re view Gerrit 8Thursday, October 20,
  9. 9. Git, Gerrit and CI Remote Repo t ch p ull/fe Working commit Tree merge pus h fo Local Repo r re view h fetc fy veri Gerrit 9Thursday, October 20,
  10. 10. Request for Review Remote Repo tch p ull/fe • Implementing a new feature merge pus h fo • Committing them to the repo Local Repo r re view • Uploading changes to Gerrit Gerrit 10Thursday, October 20,
  11. 11. Uploading changes (Simple) $ git init $ git clone ssh://[user]@hostname:port/[project] ... $ git push origin HEAD:refs/for/master ... 11Thursday, October 20,
  12. 12. Uploading changes (Advanced) $ git push [alias] HEAD:refs/for/[branch] $ git push ssh://[user]@hostname:port/[project] HEAD:refs/for/[branch] $ git push [alias] HEAD~1:refs/for/[branch] $ git push [alias] [MD5]:refs/for/[branch] or $ git config remote.[alias].push refs/head/*:refs/for/* $ git push [alias] 12Thursday, October 20,
  13. 13. Adding Reviewers Add Reviewer 13Thursday, October 20,
  14. 14. Uploading/Adding Reviewers (Advanced) $ git push [alias] --receive-pack=‘git receive-pack --reviewer [email 1] --reviewer [email 2] --cc [email 3] --cc [email 4]‘ HEAD:refs/for/[branch] or $ git config remote.[alias].receivepack ‘git receive-pack --reviewer [email 1] --cc [email 2]’ $ git push [alias] HEAD:refs/for/[branch] 14Thursday, October 20,
  15. 15. Review and Verify Remote Repo a. 1 fetc h merge a.2 Reviewers revi ew h .1 fetc b fy veri b .2 Gerrit 15Thursday, October 20,
  16. 16. Review Remote Repo a. 1 fetc h merge • Fetching the changes a.2 revi Reviewers ew • Code review! Gerrit 16Thursday, October 20,
  17. 17. Fetching the changes copy 17Thursday, October 20,
  18. 18. Fetching the changes $ git fetch http://hostname:port/p/[project] refs/changes/[last two numbers of change id]/ [change id]/[patch id] $ git checkout FETCH_HEAD $ git show HEAD ex) $ git fetch http://reviews.geekple.com/p/memcached refs/changes/40/40/2 18Thursday, October 20,
  19. 19. Review (Advanced) $ ssh -p [port] [user]@[hostname] gerrit review --code-review=+1 --project=[project] [commit or change,patch] 19Thursday, October 20,
  20. 20. Verify Remote Repo merge • -1 when the build fails. • +1 when it passes. fetc h b .1 fy veri b .2 Gerrit 20Thursday, October 20,
  21. 21. Verify (Advanced) $ ssh -p [port] [user]@[hostname] gerrit review --verified=+1 --project=[project] [commit or change,patch] 21Thursday, October 20,
  22. 22. Q&A 22Thursday, October 20,
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×