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/
Ad

More Related Content

Viewers also liked (9)

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

Similar to Gerrit Code Review - The Introduction (20)

GIT - GOOD PRACTICES
GIT - GOOD PRACTICESGIT - GOOD PRACTICES
GIT - GOOD PRACTICES
Rodolfo Spalenza
 
Introducción a git y GitHub
Introducción a git y GitHubIntroducción a git y GitHub
Introducción a git y GitHub
Lucas Videla
 
Git internals
Git internalsGit internals
Git internals
Haggai Philip Zagury
 
Git Concepts, Commands and Connectivity
Git Concepts, Commands and ConnectivityGit Concepts, Commands and Connectivity
Git Concepts, Commands and Connectivity
Raja Soundaramourty
 
Git Workshop : Git On The Server
Git Workshop : Git On The ServerGit Workshop : Git On The Server
Git Workshop : Git On The Server
Wildan Maulana
 
Quick and Dirty Python Deployments with Heroku
Quick and Dirty Python Deployments with HerokuQuick and Dirty Python Deployments with Heroku
Quick and Dirty Python Deployments with Heroku
Daniel Pritchett
 
Git real slides
Git real slidesGit real slides
Git real slides
Lucas Couto
 
Git_real_slides
Git_real_slidesGit_real_slides
Git_real_slides
Khanh NL-bantoilatoi
 
Phishing url detection: A real - case scenario through login URLs
Phishing url detection: A real - case scenario through login URLsPhishing url detection: A real - case scenario through login URLs
Phishing url detection: A real - case scenario through login URLs
dhanushalladi51
 
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlGit the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version control
Becky Todd
 
Git walkthrough
Git walkthroughGit walkthrough
Git walkthrough
Mahmoud Said
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
GDSCBMC
 
Build javascript in private environment
Build javascript in private environmentBuild javascript in private environment
Build javascript in private environment
Mingtao (Craig) Zhang
 
A Quick Start - Version Control with Git
A Quick Start - Version Control with GitA Quick Start - Version Control with Git
A Quick Start - Version Control with Git
Dmitry Sheiko
 
Gitosis on Mac OS X Server
Gitosis on Mac OS X ServerGitosis on Mac OS X Server
Gitosis on Mac OS X Server
Yasuhiro Asaka
 
Git operation 101
Git operation 101Git operation 101
Git operation 101
Kyohei Moriyama
 
Git presentation
Git presentationGit presentation
Git presentation
James Cuzella
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
Matt Gauger
 
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung FuJAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
jazoon13
 
Becoming a Git Master
Becoming a Git MasterBecoming a Git Master
Becoming a Git Master
Nicola Paolucci
 
Introducción a git y GitHub
Introducción a git y GitHubIntroducción a git y GitHub
Introducción a git y GitHub
Lucas Videla
 
Git Concepts, Commands and Connectivity
Git Concepts, Commands and ConnectivityGit Concepts, Commands and Connectivity
Git Concepts, Commands and Connectivity
Raja Soundaramourty
 
Git Workshop : Git On The Server
Git Workshop : Git On The ServerGit Workshop : Git On The Server
Git Workshop : Git On The Server
Wildan Maulana
 
Quick and Dirty Python Deployments with Heroku
Quick and Dirty Python Deployments with HerokuQuick and Dirty Python Deployments with Heroku
Quick and Dirty Python Deployments with Heroku
Daniel Pritchett
 
Phishing url detection: A real - case scenario through login URLs
Phishing url detection: A real - case scenario through login URLsPhishing url detection: A real - case scenario through login URLs
Phishing url detection: A real - case scenario through login URLs
dhanushalladi51
 
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlGit the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version control
Becky Todd
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
GDSCBMC
 
Build javascript in private environment
Build javascript in private environmentBuild javascript in private environment
Build javascript in private environment
Mingtao (Craig) Zhang
 
A Quick Start - Version Control with Git
A Quick Start - Version Control with GitA Quick Start - Version Control with Git
A Quick Start - Version Control with Git
Dmitry Sheiko
 
Gitosis on Mac OS X Server
Gitosis on Mac OS X ServerGitosis on Mac OS X Server
Gitosis on Mac OS X Server
Yasuhiro Asaka
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
Matt Gauger
 
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung FuJAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
jazoon13
 
Ad

More from Dariusz Łuksza (8)

A story of 715 commits… in ~15 minutes

A story of 715 commits… in ~15 minutes
A story of 715 commits… in ~15 minutes

A story of 715 commits… in ~15 minutes

Dariusz Łuksza
 
One Man App
One Man AppOne Man App
One Man App
Dariusz Łuksza
 
Your own full blown Gerrit plugin
Your own full blown Gerrit pluginYour own full blown Gerrit plugin
Your own full blown Gerrit plugin
Dariusz Łuksza
 
Guiding Diffy to the Enterprise land
Guiding Diffy to the Enterprise landGuiding Diffy to the Enterprise land
Guiding Diffy to the Enterprise land
Dariusz Łuksza
 
Review your code like a Googler
Review your code like a GooglerReview your code like a Googler
Review your code like a Googler
Dariusz Łuksza
 
Git in Eclipse
Git in EclipseGit in Eclipse
Git in Eclipse
Dariusz Łuksza
 
Eclipse of idleness and focus on current task (rev. 2)
Eclipse of idleness and focus on current task (rev. 2)Eclipse of idleness and focus on current task (rev. 2)
Eclipse of idleness and focus on current task (rev. 2)
Dariusz Łuksza
 
A story of 715 commits… in ~15 minutes

A story of 715 commits… in ~15 minutes
A story of 715 commits… in ~15 minutes

A story of 715 commits… in ~15 minutes

Dariusz Łuksza
 
Your own full blown Gerrit plugin
Your own full blown Gerrit pluginYour own full blown Gerrit plugin
Your own full blown Gerrit plugin
Dariusz Łuksza
 
Guiding Diffy to the Enterprise land
Guiding Diffy to the Enterprise landGuiding Diffy to the Enterprise land
Guiding Diffy to the Enterprise land
Dariusz Łuksza
 
Review your code like a Googler
Review your code like a GooglerReview your code like a Googler
Review your code like a Googler
Dariusz Łuksza
 
Eclipse of idleness and focus on current task (rev. 2)
Eclipse of idleness and focus on current task (rev. 2)Eclipse of idleness and focus on current task (rev. 2)
Eclipse of idleness and focus on current task (rev. 2)
Dariusz Łuksza
 
Ad

Recently uploaded (20)

Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 

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/