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

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 - GermanCollabNet
 
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
 

Viewers also liked (9)

UsersGuide
UsersGuideUsersGuide
UsersGuide
 
Introducing CollabNet TeamForge® 8.0
Introducing CollabNet TeamForge® 8.0Introducing CollabNet TeamForge® 8.0
Introducing CollabNet TeamForge® 8.0
 
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!
 
Git Gerrit Mit Teamforge
Git Gerrit Mit TeamforgeGit Gerrit Mit Teamforge
Git Gerrit Mit Teamforge
 
Git/Gerrit with TeamForge
Git/Gerrit with TeamForgeGit/Gerrit with TeamForge
Git/Gerrit with TeamForge
 
Enterprise Git Adoption Webinar - German
Enterprise Git Adoption Webinar - GermanEnterprise Git Adoption Webinar - German
Enterprise Git Adoption Webinar - German
 
Zero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeZero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review Upgrade
 
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
 
Gerrit Code Review
Gerrit Code ReviewGerrit Code Review
Gerrit Code Review
 

Similar to Gerrit Code Review - The Introduction

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
 
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
 
آموزش کار با GIT
آموزش کار با GITآموزش کار با GIT

Similar to Gerrit Code Review - The Introduction (20)

GIT - GOOD PRACTICES
GIT - GOOD PRACTICESGIT - GOOD PRACTICES
GIT - GOOD PRACTICES
 
Introducción a git y GitHub
Introducción a git y GitHubIntroducción a git y GitHub
Introducción a git y GitHub
 
Git internals
Git internalsGit internals
Git internals
 
Git Concepts, Commands and Connectivity
Git Concepts, Commands and ConnectivityGit Concepts, Commands and Connectivity
Git Concepts, Commands and Connectivity
 
Git Workshop : Git On The Server
Git Workshop : Git On The ServerGit Workshop : Git On The Server
Git Workshop : Git On The Server
 
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
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Git_real_slides
Git_real_slidesGit_real_slides
Git_real_slides
 
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
 
Git walkthrough
Git walkthroughGit walkthrough
Git walkthrough
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Build javascript in private environment
Build javascript in private environmentBuild javascript in private environment
Build javascript in private environment
 
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
 
Gitosis on Mac OS X Server
Gitosis on Mac OS X ServerGitosis on Mac OS X Server
Gitosis on Mac OS X Server
 
Git operation 101
Git operation 101Git operation 101
Git operation 101
 
Git presentation
Git presentationGit presentation
Git presentation
 
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
 
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
 
Becoming a Git Master
Becoming a Git MasterBecoming a Git Master
Becoming a Git Master
 
آموزش کار با GIT
آموزش کار با GITآموزش کار با GIT
آموزش کار با GIT
 

More from 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
 
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
 

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

 
One Man App
One Man AppOne Man App
One Man App
 
Your own full blown Gerrit plugin
Your own full blown Gerrit pluginYour own full blown Gerrit plugin
Your own full blown Gerrit plugin
 
Guiding Diffy to the Enterprise land
Guiding Diffy to the Enterprise landGuiding Diffy to the Enterprise land
Guiding Diffy to the Enterprise land
 
Review your code like a Googler
Review your code like a GooglerReview your code like a Googler
Review your code like a Googler
 
Git in Eclipse
Git in EclipseGit in Eclipse
Git in Eclipse
 
Put more eyes on code
Put more eyes on codePut more eyes on code
Put more eyes on code
 
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)
 

Recently uploaded

Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
jpupo2018
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 

Recently uploaded (20)

Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 

Gerrit Code Review - The Introduction

  • 1. Introduction to Gerrit Dariusz Łuksza dariusz@luksza.org @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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 <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
  • 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 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/