SlideShare a Scribd company logo
Introduction to Gerrit


    Dariusz Łuksza
     dariusz@luksza.org
          @dluksza
Git?!
    Copyright © 2012 Dariusz Łuksza
What is Gerrit?


      Git server

      Gerrit
HTTP serverSSH server




                     Copyright © 2012 Dariusz Łuksza
Why use code view?
●   Early catch of common errors:
    –   NullPoinerException
    –   Code duplication
    –   Deprecated code use
    –   Typos
●   Code design review
●   Improve team knowledge about project
●   Can be used as knowledge base


                                      Copyright © 2012 Dariusz Łuksza
Who uses Gerrit?




                   Copyright © 2012 Dariusz Łuksza
Gerrit @ Eclipse Foundation




                       Copyright © 2012 Dariusz Łuksza
What is needed to use it?
●   Gerrit server
●   git – with additional configuration
    –   proper refspec
    –   commit message hook
●   or EGit




                                          Copyright © 2012 Dariusz Łuksza
What is “refspec”?

$ git push <repo_name> <src_branch>:<dst_branch>
example:
●   $ git push origin fix-npe:master
●   $ git push origin fix-npe:refs/for/master
or configure this as default push action for repository:
$ git configure remote.origin.push HEAD:refs/for/master
Or use EGit and “Push to Gerrit” action.



                                                Copyright © 2012 Dariusz Łuksza
What is “commit hook”?
●   Script executed by git after commit operation
●   Gerrit commit hook adds Change-Id meta data
●   It is project independent so after fetching from
    server for one project you can copy it locally

●   Or use EGit and don't bother about hooks.




                                           Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit 0a60797abd716298c6f6f8eb641451ae507eb9bf
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I871f6b4c500c96f4f7a91abf236f76b00d9057ca
$ git push origin HEAD:refs/for/master

                                                 Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit 0a60797abd716298c6f6f8eb641451ae507eb9bf
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I871f6b4c500c96f4f7a91abf236f76b00d9057ca
$ git push origin HEAD:refs/for/master

                                                Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit 0a60797abd716298c6f6f8eb641451ae507eb9bf
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I871f6b4c500c96f4f7a91abf236f76b00d9057ca
$ git push origin HEAD:refs/for/master

                                                Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit 0a60797abd716298c6f6f8eb641451ae507eb9bf
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I871f6b4c500c96f4f7a91abf236f76b00d9057ca
$ git push origin HEAD:refs/for/master

                                                Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit 0a60797abd716298c6f6f8eb641451ae507eb9bf
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I871f6b4c500c96f4f7a91abf236f76b00d9057ca
$ git push origin HEAD:refs/for/master

                                                Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56
$ git push origin HEAD:refs/for/master

                                                Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56
$ git push origin HEAD:refs/for/master

                                                Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56
$ git push origin HEAD:refs/for/master

                                                Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56
$ git push origin HEAD:refs/for/master

                                                Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56
$ git push origin HEAD:refs/for/master

                                                Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56
$ git push ssh://<login>@<host>:29418/<proj> HEAD:refs/for/master

                                                 Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56
$ git push ssh://<login>@<host>:29418/<proj> HEAD:refs/for/master

                                                 Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56
$ git push ssh://<login>@<host>:29418/<proj> HEAD:refs/for/master

                                                 Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56
$ git push ssh://<login>@<host>:29418/<proj> HEAD:refs/for/master

                                                 Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56
$ git push ssh://<login>@<host>:29418/<proj> HEAD:refs/for/master

                                                 Copyright © 2012 Dariusz Łuksza
Lets create first review request
$ git init
$ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/
$ echo 'first review' > readme.txt
$ git add readme.txt
$ git commit -m 'my first commit'
$ git log
commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152
Author: Dariusz Luksza <dariusz@luksza.org>
Date: Tue Nov 20 11:20:13 2012 +0100

  my first commit

  Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56
$ git push ssh://<login>@<host>:29418/<proj> HEAD:refs/for/master

                                                Copyright © 2012 Dariusz Łuksza
Review change in Web UI



                 m o
           d e
    iv e
L
                    Copyright © 2012 Dariusz Łuksza
Add inline comments



              mo
          d e
 ive
L
                   Copyright © 2012 Dariusz Łuksza
Amend change



           mo
       d e
 ive
L
                 Copyright © 2012 Dariusz Łuksza
Vote on change



           mo
       d e
 ive
L
                  Copyright © 2012 Dariusz Łuksza
Submit change



            mo
        d e
 ive
L
                  Copyright © 2012 Dariusz Łuksza
Gerrit ACL
●   Read
●   Push
●   Push merge commit
●   Push annotated tag
●   Label code review (-2 to +2)
●   Label verified (-1 to +1)
●   Create reference (aka create branch)
●   Abandon
●   Edit topic
●   Forge author identity
●   Forge committer identity
●   Forge server identity
●   Rebase
●   Remove reviewer


                                                Copyright © 2012 Dariusz Łuksza
Gerrit Plugability
●   Plugins
    –   Plugins
    –   Extensions
●   Prolog rules for change validation




                                          Copyright © 2012 Dariusz Łuksza
Review from Eclipse




                      Copyright © 2012 Dariusz Łuksza
Introduction to Gerrit
               Dariusz Łuksza
                 dariusz@luksza.org
                      @dluksza


Useful links:
● Git – http://git-scm.com/

● EGit – http://eclipse.org/egit/

● Gerrit – http://gerrit.googlecode.com/

● Mylyn reviews – http://eclipse.org/reviews/gerrit/

More Related Content

Viewers also liked (9)

PDF
UsersGuide
tutorialsruby
 
PDF
Introducing CollabNet TeamForge® 8.0
CollabNet
 
PPTX
Don't Let Git Get Your Goat!
CollabNet
 
PDF
Git Gerrit Mit Teamforge
CollabNet
 
PDF
Git/Gerrit with TeamForge
CollabNet
 
PDF
Enterprise Git Adoption Webinar - German
CollabNet
 
PPTX
Zero-Downtime Gerrit Code Review Upgrade
Luca Milanesio
 
PDF
How Git and Gerrit make you more productive
Karsten Dambekalns
 
PPTX
Gerrit Code Review
Luca Milanesio
 
UsersGuide
tutorialsruby
 
Introducing CollabNet TeamForge® 8.0
CollabNet
 
Don't Let Git Get Your Goat!
CollabNet
 
Git Gerrit Mit Teamforge
CollabNet
 
Git/Gerrit with TeamForge
CollabNet
 
Enterprise Git Adoption Webinar - German
CollabNet
 
Zero-Downtime Gerrit Code Review Upgrade
Luca Milanesio
 
How Git and Gerrit make you more productive
Karsten Dambekalns
 
Gerrit Code Review
Luca Milanesio
 

Similar to Gerrit Code Review - The Introduction (20)

PDF
Review your code like a Googler
Dariusz Łuksza
 
PDF
Git for beginners
Vinh Nguyen
 
PDF
Understanding git
Avik Das
 
PDF
GIT: Content-addressable filesystem and Version Control System
Tommaso Visconti
 
PDF
Gitosis on Mac OS X Server
Yasuhiro Asaka
 
PDF
Embedded Systems: Lecture 11: Introduction to Git & GitHub (Part 2)
Ahmed El-Arabawy
 
PDF
Phishing url detection: A real - case scenario through login URLs
dhanushalladi51
 
PPTX
Git Basic
Luke Luo
 
DOCX
Git commands
Javed Hussain
 
KEY
The everyday developer's guide to version control with Git
E Carter
 
PDF
Version control with GIT
Zeeshan Khan
 
PDF
Did you git yet?
Michael Fong
 
PDF
Git_real_slides
Khanh NL-bantoilatoi
 
PDF
Git real slides
Lucas Couto
 
PDF
Version Control with Git
Andrej Koelewijn
 
PDF
Tech thursdays / GIT
Marek Prochera
 
PPTX
git internals
Dennis Byrne
 
PDF
Jedi Mind Tricks in Git
Johan Abildskov
 
PPTX
Jedi Mind Tricks for Git
Jan Krag
 
PDF
Version Control with Git for Beginners
bryanbibat
 
Review your code like a Googler
Dariusz Łuksza
 
Git for beginners
Vinh Nguyen
 
Understanding git
Avik Das
 
GIT: Content-addressable filesystem and Version Control System
Tommaso Visconti
 
Gitosis on Mac OS X Server
Yasuhiro Asaka
 
Embedded Systems: Lecture 11: Introduction to Git & GitHub (Part 2)
Ahmed El-Arabawy
 
Phishing url detection: A real - case scenario through login URLs
dhanushalladi51
 
Git Basic
Luke Luo
 
Git commands
Javed Hussain
 
The everyday developer's guide to version control with Git
E Carter
 
Version control with GIT
Zeeshan Khan
 
Did you git yet?
Michael Fong
 
Git_real_slides
Khanh NL-bantoilatoi
 
Git real slides
Lucas Couto
 
Version Control with Git
Andrej Koelewijn
 
Tech thursdays / GIT
Marek Prochera
 
git internals
Dennis Byrne
 
Jedi Mind Tricks in Git
Johan Abildskov
 
Jedi Mind Tricks for Git
Jan Krag
 
Version Control with Git for Beginners
bryanbibat
 
Ad

More from Dariusz Łuksza (7)

PDF
A story of 715 commits… in ~15 minutes

Dariusz Łuksza
 
PDF
One Man App
Dariusz Łuksza
 
PDF
Your own full blown Gerrit plugin
Dariusz Łuksza
 
PDF
Guiding Diffy to the Enterprise land
Dariusz Łuksza
 
PDF
Git in Eclipse
Dariusz Łuksza
 
PDF
Put more eyes on code
Dariusz Łuksza
 
PDF
Eclipse of idleness and focus on current task (rev. 2)
Dariusz Łuksza
 
A story of 715 commits… in ~15 minutes

Dariusz Łuksza
 
One Man App
Dariusz Łuksza
 
Your own full blown Gerrit plugin
Dariusz Łuksza
 
Guiding Diffy to the Enterprise land
Dariusz Łuksza
 
Git in Eclipse
Dariusz Łuksza
 
Put more eyes on code
Dariusz Łuksza
 
Eclipse of idleness and focus on current task (rev. 2)
Dariusz Łuksza
 
Ad

Recently uploaded (20)

PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PDF
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
PDF
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
PDF
99 Bottles of Trust on the Wall — Operational Principles for Trust in Cyber C...
treyka
 
PDF
“A Re-imagination of Embedded Vision System Design,” a Presentation from Imag...
Edge AI and Vision Alliance
 
PPTX
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
PDF
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
PDF
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
PDF
GDG Cloud Southlake #44: Eyal Bukchin: Tightening the Kubernetes Feedback Loo...
James Anderson
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
WSO2
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
PDF
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PDF
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
99 Bottles of Trust on the Wall — Operational Principles for Trust in Cyber C...
treyka
 
“A Re-imagination of Embedded Vision System Design,” a Presentation from Imag...
Edge AI and Vision Alliance
 
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
GDG Cloud Southlake #44: Eyal Bukchin: Tightening the Kubernetes Feedback Loo...
James Anderson
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
WSO2
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
Practical Applications of AI in Local Government
OnBoard
 
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 

Gerrit Code Review - The Introduction

  • 1. Introduction to Gerrit Dariusz Łuksza [email protected] @dluksza
  • 2. Git?! Copyright © 2012 Dariusz Łuksza
  • 3. What is Gerrit? Git server Gerrit HTTP serverSSH server Copyright © 2012 Dariusz Łuksza
  • 4. Why use code view? ● Early catch of common errors: – NullPoinerException – Code duplication – Deprecated code use – Typos ● Code design review ● Improve team knowledge about project ● Can be used as knowledge base Copyright © 2012 Dariusz Łuksza
  • 5. Who uses Gerrit? Copyright © 2012 Dariusz Łuksza
  • 6. Gerrit @ Eclipse Foundation Copyright © 2012 Dariusz Łuksza
  • 7. What is needed to use it? ● Gerrit server ● git – with additional configuration – proper refspec – commit message hook ● or EGit Copyright © 2012 Dariusz Łuksza
  • 8. What is “refspec”? $ git push <repo_name> <src_branch>:<dst_branch> example: ● $ git push origin fix-npe:master ● $ git push origin fix-npe:refs/for/master or configure this as default push action for repository: $ git configure remote.origin.push HEAD:refs/for/master Or use EGit and “Push to Gerrit” action. Copyright © 2012 Dariusz Łuksza
  • 9. What is “commit hook”? ● Script executed by git after commit operation ● Gerrit commit hook adds Change-Id meta data ● It is project independent so after fetching from server for one project you can copy it locally ● Or use EGit and don't bother about hooks. Copyright © 2012 Dariusz Łuksza
  • 10. Lets create first review request $ git init $ scp -p -P 29418 <host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit 0a60797abd716298c6f6f8eb641451ae507eb9bf Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I871f6b4c500c96f4f7a91abf236f76b00d9057ca $ git push origin HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 11. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit 0a60797abd716298c6f6f8eb641451ae507eb9bf Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I871f6b4c500c96f4f7a91abf236f76b00d9057ca $ git push origin HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 12. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit 0a60797abd716298c6f6f8eb641451ae507eb9bf Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I871f6b4c500c96f4f7a91abf236f76b00d9057ca $ git push origin HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 13. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit 0a60797abd716298c6f6f8eb641451ae507eb9bf Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I871f6b4c500c96f4f7a91abf236f76b00d9057ca $ git push origin HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 14. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit 0a60797abd716298c6f6f8eb641451ae507eb9bf Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I871f6b4c500c96f4f7a91abf236f76b00d9057ca $ git push origin HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 15. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152 Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56 $ git push origin HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 16. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152 Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56 $ git push origin HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 17. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152 Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56 $ git push origin HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 18. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152 Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56 $ git push origin HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 19. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152 Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56 $ git push origin HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 20. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152 Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56 $ git push ssh://<login>@<host>:29418/<proj> HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 21. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152 Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56 $ git push ssh://<login>@<host>:29418/<proj> HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 22. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152 Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56 $ git push ssh://<login>@<host>:29418/<proj> HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 23. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152 Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56 $ git push ssh://<login>@<host>:29418/<proj> HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 24. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152 Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56 $ git push ssh://<login>@<host>:29418/<proj> HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 25. Lets create first review request $ git init $ scp -p -P 29418 <login>@<host>:hooks/commit-msg .git/hooks/ $ echo 'first review' > readme.txt $ git add readme.txt $ git commit -m 'my first commit' $ git log commit e6762c9a59c1bda7118633e4c2ddabf4ecca2152 Author: Dariusz Luksza <[email protected]> Date: Tue Nov 20 11:20:13 2012 +0100 my first commit Change-Id: I5e9f2d410fdf37d2e20bedc162b2fb9565988a56 $ git push ssh://<login>@<host>:29418/<proj> HEAD:refs/for/master Copyright © 2012 Dariusz Łuksza
  • 26. Review change in Web UI m o d e iv e L Copyright © 2012 Dariusz Łuksza
  • 27. Add inline comments mo d e ive L Copyright © 2012 Dariusz Łuksza
  • 28. Amend change mo d e ive L Copyright © 2012 Dariusz Łuksza
  • 29. Vote on change mo d e ive L Copyright © 2012 Dariusz Łuksza
  • 30. Submit change mo d e ive L Copyright © 2012 Dariusz Łuksza
  • 31. Gerrit ACL ● Read ● Push ● Push merge commit ● Push annotated tag ● Label code review (-2 to +2) ● Label verified (-1 to +1) ● Create reference (aka create branch) ● Abandon ● Edit topic ● Forge author identity ● Forge committer identity ● Forge server identity ● Rebase ● Remove reviewer Copyright © 2012 Dariusz Łuksza
  • 32. Gerrit Plugability ● Plugins – Plugins – Extensions ● Prolog rules for change validation Copyright © 2012 Dariusz Łuksza
  • 33. Review from Eclipse Copyright © 2012 Dariusz Łuksza
  • 34. Introduction to Gerrit Dariusz Łuksza [email protected] @dluksza Useful links: ● Git – http://git-scm.com/ ● EGit – http://eclipse.org/egit/ ● Gerrit – http://gerrit.googlecode.com/ ● Mylyn reviews – http://eclipse.org/reviews/gerrit/