Transcript
8/18/2019 Gerrit Tutorial
1/16
Gerrit/Tutorial
Git and Gerrit lets us deploy your code faster and makes collab-
oration easier!
This tutorial helps you with:
• step-by-step instructions and screenshots for gettingGerrit access
• setting up Git on your machine
•
configuring Git• installing git-review
• submitting a patch
• understanding the MediaWiki code review process
For the quick version, see Gerrit/Getting started.Gerrit/Advanced usage has additional documentation forpower users.
1 What is Git?
Git is a distributed version control system (dvcs) writ-ten in C originally developed by Linus Torvalds and oth-ers to manage the Linux kernel. In the past couple ofyears, it has taken off as a very robust and well-supportedcode repository. “Distributed” means that there is no cen-tral copy of the repository. With Subversion, Wikime-dia’s servers host the repository and users commit theirchanges to it. In contrast, with Git, once you’ve clonedthe repository, you have a fully functioning copy of thesource code, with all the branches and tagged releases at
your disposal.Git is a free and open source distributed version controlsystem designed to handle everything from small to very
large projects with speed and efficiency. Git is easy tolearn and has a tiny footprint with lightning fast perfor-mance. It outclasses SCM tools like Subversion, CVS,Perforce, and ClearCase with features like cheap localbranching, convenient staging areas, and multiple work-flows.
2 What is Gerrit?
Gerrit is a free, web-based collaborative code review toolthat integrates with Git. It has been developed at Googleby Shawn Pearce (co-author of Git, founder of JGit) forthe development of the Android project.
Starting from a set of patches for Rietveld, it became afork and evolved into a full blown project when ACLpatches wouldn't be merged into Rietveld by its author,Guido van Rossum.
Originally written in Python like Rietveld, it is now writ-ten in Java (Java EE Java Servlet) with SQL since version2.
3 Why did Wikimedia engineering
move from Subversion to Git
Three major reasons:
1. To encourage participation: Since Git is dis-tributed, it allows people to contribute with a muchlower barrier to entry. Anyone will be able to clonethe repository and make their own changes to keep
track of them. And if you’ve got an account inour code review tool (Gerrit), you’ll be able to pushchanges for the wider community to review.
2. To fix our technical process: Subversion has tech-nical flaws that make life difficult for developers.Notably, the implementation of branching is notvery easy to use, and makes it hard to use “featurebranches”. Our community is very distributed, withmany parallel efforts and needs to integrate manydifferent feature efforts, so we’d like to use fea-ture branches more. Git branches are very easy towork with and merge between, which should make
things easier for our development community. (Sev-eral other large projects, such as Drupal and Post-greSQL, have made the same switch for similar rea-
1
https://blog.wikimedia.org/2012/02/15/wikimedia-engineering-moving-from-subversion-to-git/https://en.wikipedia.org/wiki/SQLhttps://en.wikipedia.org/wiki/Java%2520Platform,%2520Enterprise%2520Editionhttps://en.wikipedia.org/wiki/Rietveld%2520(Software)https://en.wikipedia.org/wiki/Python%2520(programming%2520language)https://en.wikipedia.org/wiki/Guido%2520van%2520Rossumhttps://en.wikipedia.org/wiki/Access%2520control%2520listhttps://en.wikipedia.org/wiki/Rietveld%2520(Software)https://en.wikipedia.org/wiki/Androidhttps://en.wikipedia.org/wiki/Googlehttps://en.wikipedia.org/wiki/Git%2520(software)https://en.wikipedia.org/wiki/Gerrit%2520(software)https://en.wikipedia.org/wiki/Branching%2520(software)https://en.wikipedia.org/wiki/Source%2520codehttps://en.wikipedia.org/wiki/Apache%2520Subversionhttps://en.wikipedia.org/wiki/Repository%2520(version%2520control)https://en.wikipedia.org/wiki/Repository%2520(version%2520control)https://en.wikipedia.org/wiki/Linux%2520kernelhttps://en.wikipedia.org/wiki/Linus%2520Torvaldshttps://en.wikipedia.org/wiki/C%2520(programming%2520language)https://en.wikipedia.org/wiki/Distributed%2520Version%2520Control%2520Systemhttps://en.wikipedia.org/wiki/Git%2520(software)https://www.mediawiki.org/wiki/Gerrit/Advanced_usagehttps://www.mediawiki.org/wiki/Gerrit/Getting_startedhttps://www.mediawiki.org/wiki/Category:Tutorials
8/18/2019 Gerrit Tutorial
2/16
2 4 SETTING UP GIT
sons, and we’ve done our best to learn from theirexperiences.)
3. To get improvements to users faster: With betterbranching and a more granular code review work-flow that suits our needs better, plus our ongoing
improvements to our automated testing infrastruc-ture, we won’t have to wait months before deployingalready-written features and bugfixes to Wikimediasites.
4 Setting up Git
These instructions explain how to install Git as acommand-line tool. If you also want a GUI client checkthe list maintained by the Git project. For alternate in-structions look here, or here.
4.1 Installation
4.1.1 Mac OS X
Install one of the following:
• Homebrew package manager: brew install git – Rec-ommended, simple updating and easy installing ofother packages
• Standalone: Git for Mac
4.1.2 Windows
Install Git + MSys (Minimal Bash for Windows ) frommsysgit.github.io . This gives you Git, plus a shell thatallows most of the command lines in these instructions towork on Windows. See also Gerrit/TortoiseGit tutorial.
4.1.3 Linux & UNIX
Installing git on Ubuntu
For other Linux distributions please check your vendor
documentation.
• Debian/Ubuntu: sudo apt-get install git
• Fedora: yum install git
• archlinux: pacman -S git
• openSUSE: zypper install git
• Gentoo: emerge --ask --verbose dev-vcs/git
• FreeBSD: cd /usr/ports/devel/git; make install
• NetBSD: cd /usr/pkgsrc/devel/scmgit/; make install
• OpenBSD: pkg_add git
• Solaris 11 Express: pkg install devel-oper/versioning/git
• Mageia: urpmi git
Now that you have Git installed, it’s time to configure yourpersonal info.
4.2 Configure Git
Now that you have Git on your system, you’ll want to doa few things to customize your Git environment. Youshould have to do these things only once; they’ll stickaround between upgrades. You can also change them atany time by running through the commands again.
Git comes with a tool called git config that lets you get andset configuration variables that control all aspects of howGit looks and operates. To see your current configurationuse the “list” -l option:
git config -l
4.2.1 Set your username and email
Git tracks who makes each commit by checking the user’sname and email. In addition, we use this info to associateyour commits with your Gerrit account. To set these, en-ter the code below, replacing the name and email with
your own.git config --global user.email “example@example.com”git config --global user.name “example”
https://en.wikipedia.org/wiki/Linux%2520distributionshttps://www.mediawiki.org/wiki/Gerrit/TortoiseGit_tutorialhttps://msysgit.github.io/http://git-scm.com/download/machttp://mxcl.github.com/homebrew/https://help.github.com/articles/set-up-git#download-and-install-githttp://www.git-scm.com/book/en/Getting-Started-Installing-Githttp://git-scm.com/downloads/guishttps://wikimediafoundation.org/wiki/Our%2520projectshttps://wikimediafoundation.org/wiki/Our%2520projects
8/18/2019 Gerrit Tutorial
3/16
5.2 Add your SSH key 3
5 Set Up SSH Keys in Gerrit
We use SSH keys to establish a secure connection be-tween your computer and Gerrit. Setting them up is fairlyeasy, but does involve a number of steps. Run the follow-ing commands in a terminal. For alternate instructionslook here, and then here.
To make sure whether you need to generate a brand newkey, you need to check if one already exists. List the filesin your .ssh directory (if you have one):
$ ls ~/.ssh
If you see a file called id_rsa.pub here, you may skip right
to #Add your SSH key.
5.1 Generate a new SSH key
To generate a new SSH key, enter the code below. Wewant the default settings so when asked to enter a file inwhich to save the key, just press enter.
$ ssh-keygen -t rsa -C “your_email@youremail.com”
Assign a memorable passphrase and press [enter] ( press the [enter] key twice if you don't want a passphrase*).
* Why do passphrases matter?Passwords aren’t very secure, you
already know this. If you use
one that’s easy to remember, it’s
easier to guess or brute-force (try
many options until one works).
If you use one that’s random it’s
hard to remember, and thus you’re
more inclined to write the password
down. Both of these are Very Bad
Things™. This is why you’re using
ssh keys.
But using a key without a passphrase
is basically the same as writing
down that random password in a
file on your computer. Anyone who
gains access to your drive has gained
access to every system you use that
key with. This is also a Very Bad
Thing™. The solution is obvious:
add a passphrase.
But I don’t want to enter a long
passphrase every time I use the
key!
Neither do we! Thankfully, there’s a
nifty little tool called ssh-agent that
can save your passphrase securely
so you don’t have to re-enter it. If
you’reon OSX Leopard or later your
keys can be saved in the system’s
keychain to make your life even eas-ier.
Which should give you something like this:
It will create 2 files in ~/.ssh directory as follows:
~/.ssh/id_rsa : identification (private) key~/.ssh/id_rsa.pub : public key
5.2 Add your SSH key
Open your public key file, (e.g. id_rsa.pub)with a text ed-itor (Notepad, TextEdit, or gedit will do just fine). Youmay need to turn on “view hidden files” to find it becausethe .ssh directory is hidden. It’s important you copy your
SSH key exactly as it is written without adding any new-lines or whitespace. Copy the full text, including the “ssh-rsa” lead and email address tail.
https://www.mediawiki.org/wiki/Gerrit/Tutorial#Add_your_SSH_keyhttps://wikitech.wikimedia.org/wiki/Help:Getting_Started#Create_a_User_Accounthttps://help.github.com/articles/generating-ssh-keys#step-1-check-for-ssh-keys
8/18/2019 Gerrit Tutorial
4/16
4 6 PREPARE TO WORK WITH GERRIT
On a linux system you can use the following:
cat /home//.ssh/id_rsa.pub
Which for local-user preilly, gives this:
5.2.1 Can’t view hidden files? Other ways to copy:
OSX
$ pbcopy < ~/.ssh/id_rsa.pub # Copies the contents of theid_rsa.pub file to your clipboard
Windows
You can open Git GUI, go to Help > Show Key, and thenpress Copy To Clipboard to copy your public key to yourclipboard.
Linux
$ sudo apt-get install xclip # Downloads and installs xclip$ xclip -sel clip < ~/.ssh/id_rsa.pub
5.3 Add SSH key to your Gerrit account
Create an account at wikitech.wikimedia.org if you donot yet have one.
Log into the web interface for Gerrit. Click on your user-name in the top right corner, then choose “Settings”. Onthe left you will see SSH PUBLIC KEYS. Paste your SSHPublic Key into the corresponding field. Alternately, oncelogged in, use these direct links to add your public key toGerrit and wikitech.
5.4 Add SSH key to use with Git
Start Git Bash.
•
Get ssh-agent running using
$ eval `ssh-agent`
Be sure to use the accent " ` " located under thetilde " ~ " (or above tab for UK keyboards), notthe single quote " ' ".
• Add your private key to the agent (use path to yourprivate key file)
$ ssh-add .ssh/id_rsa
if the key is in the default location, use $ ssh-
add ~/.ssh/id_rsaKey should be in OpenSSH format (.ppk keyscan be exported to this format in PuTTyGen).
• Run ssh. (Do be paranoid and check for the match-ing SSH fingerprint for gerrit.wikimedia.org:29418when logging in for the first time.)
$ ssh -p 29418 @gerrit.wikimedia.org
It should give a Gerrit welcome message andthen abort. If it doesn't, add the -v (verbose)option to the command to help debug.
5.5 Download the Examples extension us-
ing Git
You can download MediaWiki core using Git, as wellas the source code of any project repository hosted atgerrit.wikimedia.org (the Wikimedia Foundation servercluster).
Let’s practice downloading the Examples extension. Sim-ply run the following on the git bash command line:
$ git clone ssh://@gerrit.wikimedia.org:29418/mediawiki/extensions/examples
This will copy the entire history of the “Examples” exten-sion repository. You will have a working directory of theextension’s main branch, so you can look at the code andstart editing it. If you change into the new directory, youcan see the .git subdirectory. That is where all the projectdata is.
By default, Git will create a directory that has the samename as the project in the URL you give it - basicallywhatever is after the last slash of the URL. If you wantsomething different, you can just put it at the end of thecommand, after the URL. So, in this example you will
have a “examples” directory.
6 Prepare to work with Gerrit
Your commit message needs a “change ID” inorder to work with Gerrit. You can see thesein the git log for a project and if you browsechanges on Gerrit, they look like Change-Id:I bd3be19ed1a23c8638144b4a1d32f544ca1b5f97starting with an I (capital i)). Each time you amenda commit in response to Gerrit feedback git gives it a
new commit ID, but because this change ID stays thesame Gerrit will keep track of it as a new “patch set”addressing the same change.
https://en.wikipedia.org/wiki/Command%2520linehttps://en.wikipedia.org/wiki/Server%2520clusterhttps://en.wikipedia.org/wiki/Server%2520clusterhttps://en.wikipedia.org/wiki/Wikimedia_Foundationhttps://gerrit.wikimedia.org/https://www.mediawiki.org/wiki/Download_from_Githttps://wikitech.wikimedia.org/wiki/Help:SSH_Fingerprints/gerrit.wikimedia.org:29418https://wikitech.wikimedia.org/wiki/Special:NovaKeyhttps://gerrit.wikimedia.org/r/#/settings/ssh-keyshttps://gerrit.wikimedia.org/https://wikitech.wikimedia.org/wiki/Special:UserLogin/signup
8/18/2019 Gerrit Tutorial
5/16
6.2 Configuring git-review 5
There’s a git add-on called git-review that adds a Change-ID line to your commits and manages other aspects ofusing Gerrit.
6.1 Installing git-review
For more details, please see Gerrit/git-review
First, install the release version of git-review.
In Windows, please see Gerrit/git-review#Windows.
If you're running recent Debian/Ubuntu, git-review hasbeen packaged, so you can simply run
$ sudo apt-get install git-review
If that worked, skip past the next section.
6.1.1 Install using pip Python package installer
Generally, the easiest way to get the latest version of git-review is to install it using the python package installerpip:
$ sudo pip install git-review
If that worked, skip to the next section. If you need toinstall pip, then:
In Debian/Ubuntu, to install
$ sudo apt-get install python-pip
On OpenSuse, install via YaST python-setuptools, thenrun
$ sudo easy_install pip
$ sudo pip install git-review
On FreeBSD, you directly have a kept up to datedevel/git-review port:
$ cd /usr/ports/devel/git-review $ make install
Note: if you don't have apt-get but have python installed,you can use this:
$ sudo easy_install pip $ sudo pip install git-review
Or, if you already have git-review installed, you can up-
grade it using$ sudo pip install --upgrade git-review
6.2 Configuring git-review
Git is a distributed version control system; it’s possible tofetch code from one host, push your changes to another,and submit them to a third for Gerrit code review. It’s alot simpler to work with one “remote” for all three. SinceGit’s default remote name is “origin” and most guides on
the web use that name, let’s tell git-review to use this aswell.
$ git config --global gitreview.remote origin
https://en.wikipedia.org/wiki/Pip%2520(Python)https://www.mediawiki.org/wiki/Gerrit/git-review#Windowshttps://www.mediawiki.org/wiki/Gerrit/git-reviewhttps://www.mediawiki.org/wiki/Gerrit/git-review
8/18/2019 Gerrit Tutorial
6/16
6 7 HOW TO SUBMIT A PATCH
Note: Older versions of git-review used a separate con-fig file:.config/git-review/git-review.conf (in Windows,the file is %USERPROFILE%\.config\git-review\git-review.conf) and add these two lines:
## Deprecated! [gerrit] defaultremote = origin
6.3 Setting up git-review
After cloning a repository, you need to set it up for git-review. This will automatically happen the first time youtry to submit a commit, but it’s generally better to do itright after cloning. In your project’s directory (“exam-ples”), enter
$ git review -s
which should give you this:
If you see “the authenticity of host gerrit.wikimedia.org
can't be established...” Don’t worry, this is supposed tohappen the first time. Type “yes”.
This may ask you for your git username, if it’s different
from the shell username you're using.
7 How to submit a patch
For a brief overview see Gerrit/Getting started.
The main avenue for submitting changes to MediaWikicode is to first join the MediaWiki development commu-nity so you can submit changes to Gerrit, our code reviewtool. Getting developer access is relatively easy.
Clone the “mediawiki core” repository or the project
repository which you are interested in. Open git bash andenter one of the following lines:
$ git clone ssh://USERNAME@gerrit.wikimedia.org:29418/mediawiki/core.git $ git clone ssh://USERNAME@gerrit.wikimedia.org:29418/mediawiki/extensions/EXTENSION.git
Substitute your Gerrit username and the extension orproject name. You can copy this git command from thetop of the project’s home page in Gerrit.
7.1 Update master
Make sure that your master branch (the branch createdwhen you initially cloned the repository) is up to date:
git pull origin master
However, note that a few repositories use different terms(for example operations/puppet has a “production” in-stead of a “master” branch).
7.2 Create a branch
First, create a local branch for your new change. Givethe branch a short but reasonably descriptive name (e.g.T1234, bug/1234, cleanup/some-thing, badtitle-error, ..).
git checkout -b BRANCHNAME origin/master
krinkle@example:~/dev/mw$ git checkout -b badtitle-error origin/master # Switched to a new branch'badtitle-error' krinkle@example:~/dev/mw$ git branch* badtitle-error master
This will create a new branch (BRANCHNAME) fromthe latest 'master' and check it out for you. This is equiv-alent to doing
git branch BRANCHNAME --track origin/master gitcheckout BRANCHNAME
7.3 Make and commit your change
7.3.1 Usual way
Modify your local code in some fashion. Us-ing your preferred editor, modify the file Exam-ple/Example.body.php
Then check the changes you've made, within the file(s)and within the directory:
git diff
https://www.mediawiki.org/wiki/Developer_accesshttps://www.mediawiki.org/wiki/Developer_accesshttps://www.mediawiki.org/wiki/Gerrit/Getting_startedhttps://www.mediawiki.org/wiki/Download_from_Git
8/18/2019 Gerrit Tutorial
7/16
7.3 Make and commit your change 7
Without any extra arguments, a simple git diff will dis-play in unified diff format (a patch) what code or contentyou've changed in your project since the last commit thatare not yet staged for the next commit snapshot.
Then check the changes you've made, within the file(s)
and within the directory:git status
You run git status to see if anything has been modifiedand/or staged since your last commit so you can decideif you want to commit a new snapshot and what will berecorded in it.
This will show all modified files. To prepare submitting afile, you should add your changes to the index (the stagingarea between your working copy and your local reposi-tory), which is done by using the git add command.
git add Example/Example.body.php
You pass a file to git add when you want the changes youmade to it to be included in your next commit.
Any files you've changed that are not staged by you doinggit add will be left alone - this means you can craft yourcommits with a bit more precision.
At any time you can always review the changes alreadyadded to the staging area by running git status, and lookat the diff with git diff --cached:
The git diff --cached command will show you what con-tents have been staged. That is, this will show you the
changes that will currently go into the next commit snap-shot.
Once you are happy with the change list, you can addthem to your local repository by using
git commit
You will then be prompted in your favorite editor to adda descriptive message for this commit. This is what otherpeople will see when you will later push that commit toanother repository. If you do not manually add a Change-ID line to your commit message, it will be automaticallygenerated and added for you.
You can repeat this step over and over until you have aset of changes that you want to have pushed to the mas-ter branch. One of the cool things about git is that whenyou git commit, you are committing to your local copy.This means you can commit as often as you like withoutpotentially screwing things up for another developer onthe project, unlike in SVN where you would want to bevery careful that the changes you commit would not causethings to break.
Hence the workflow is something like:
# Add change: $ git add # Verify list offiles added to the staging area $ git status # Review diff
https://en.wikipedia.org/wiki/Apache%2520Subversionhttps://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelineshttps://en.wikipedia.org/wiki/Diff#Unified_format
8/18/2019 Gerrit Tutorial
8/16
8 7 HOW TO SUBMIT A PATCH
of changes staged: $ git diff --cached # repeat until youare happy with your changes $ git commit
7.4 Prepare to push your change set toGerrit
Before your changes can be merged into master, theymust undergo review in Gerrit.
But first, it’s a good idea to synchronize your change setwith any changes that may have occurred in master whileyou've been working. From within the branch you'vebeen working on, execute the following command:
git pull --rebase origin master
This command will fetch new commits from the remoteandthen rebase your local commits on topof them. It willtemporarily set aside the changes you've made in yourbranch, apply all of the changes that have happened inmaster to your working branch, then merge (recommit)all of the changes you've made back into the branch. Do-
ing this will help avoid future merge conflicts. Plus, itgives you an opportunity to test your changes against thelatest code in master.
Once you are satisfied with your change set and you'verebased against master, you are ready to push your codeto Gerrit for review.
Note: It is recommended to use git-review to submitpatches for review. If you do not have installed git-reviewand do not want to do so, you can use the Gerrit patch up-loader to submit your patch.
7.5 Squash into single commit
If you make several related commits to your local repos-itory prior to wanting to submit for review, you shouldsquash those commits into a single commit. If you've fol-lowed everything above, you can perform this action bydoing:
git rebase -i origin/master
This will bring up your text editor with text like:
pick 749a62a Added a file pick ec9295b Changed somecode pick be33007 Fixed my bug in that file
Change all but the first “pick” to “squash":
pick 749a62a Added a file squash ec9295b Changed
some code squash be33007 Fixed my bug in that file
Save the file. Another file will open in your text editorwhich will allow you to edit the combined commit mes-sage. Be careful to only keep one of the Change-Id linesand have it be at bottom of the message after one empty
line.
7.6 Push your change set to Gerrit
It is recommended to use git-review to submit patches forreview. If you do not have installed git-review and do notwant to do so, you can use the Gerrit patch uploader tosubmit your patch.
If you installed git-review and you ran git review -s to setit up for this repository, the command to push changes toGerrit is very simple:
git review -RThe -R option tells git-review not to perform a rebase be-fore submitting the change to Gerrit.
Upon success, you'll get a confirmation and a link to thechangeset in Gerrit.
New patchset: preilly; “Added get version method to ex-tension” [test/mediawiki/extensions/examples] (master) -https://gerrit.wikimedia.org/r/9332
7.6.1 Problems
If you forgot to run git review -s, “remote” will complainabout “missing Change-id in commit message”.
But it will also suggest a commit message with a Change-
Id: INNNXXXNNN... line.Either:
• Copy that line starting with “Change-Id”, run gitcommit --amend, and paste the Change-Id line un-der your commit message in the text editor thatopens up.
• Or it will suggest a hook fix:gitdir=$(git rev-parse --git-dir); scp -p -P 29418 freephile@gerrit.wikimedia.org:hooks/commit-msg ${gitdir}/hooks/
You should be able to use either method (but the hook
https://gerrit.wikimedia.org/r/9332https://en.wikipedia.org/wiki/Gerrit%2520(software)https://www.mediawiki.org/wiki/Gerrit_patch_uploaderhttps://www.mediawiki.org/wiki/Gerrit/git-reviewhttps://www.mediawiki.org/wiki/Gerrit_patch_uploaderhttps://www.mediawiki.org/wiki/Gerrit_patch_uploaderhttps://www.mediawiki.org/wiki/Gerrit/git-review
8/18/2019 Gerrit Tutorial
9/16
7.9 Amending a change (your own or someone else’s) 9
didn't work for me), then repeat git review -R and itshould complete.
7.7 View the Change / Next Steps
You can view this change in the Gerrit Web UI:
If you want to see your changed files in their context thenclick on the (gitweb) links and the tree link (you then willsee).
If your commit addresses a ticket in Phabricator, pleasecomment on that ticket to note that the commit is in themerge queue, and link to its changeset in Gerrit.
7.8 Push to a branch
As you can see in the screenshot above, the commit was
pushed to master. The branch name only appeared asthe topic of the commit. If you really want to push to abranch, you have to push via git review .
7.9 Amending a change (your own or
someone else’s)
BEWARE: git review -d performs a hard reset that de-stroys all local changes. Stash or commit changes youwish to preserve first.
Sometimes, you might need to amend a submittedchange. You can amend your own changes as well aschanges submitted by someone else, as long as the changehasn't been merged yet.
Rebase to bring your local branch up to date with the re-mote. It’sbest to make rebase updates a separate patch, sothat your code reviewers have an easy time seeing whatchanges you've made. Assuming you are using Gerrit,you can do this by clicking the “Rebase Change” buttonwhen viewing your patch in Gerrit’s web interface.
If you havegit-review, hard reset andcheckout thechangewith this command:
git review -d
Note, if you already have the change in a branch on yourlocal repository, you can just check it out instead:
git checkout For example:
git review -d 9332
Or, if you already have the branch,
git checkout review/preilly/2012/bug12345
Should accomplish the same thing.
Next, make some changes.
vim Example/Example.body.php
https://en.wikipedia.org/wiki/Gerrit%2520(software)https://www.mediawiki.org/wiki/Phabricator
8/18/2019 Gerrit Tutorial
10/16
10 7 HOW TO SUBMIT A PATCH
git add the files as needed, then commit the change (en-suring you are amending the commit):
git add Example/Example.body.php git commit --amend--all
NOTE: DO NOT use the -m flag to specify a commitsummary: that will override the previous summary andregenerate the Change-Id. Instead, use your text editorto change the commit summary if needed, and keep theChange-Id line intact.
Push the change
git review -R
The -R is important here. It tells git-review to
not rebase your change against master, whichclutters diffs between patch set 1 and 2.
New patchset: preilly; “Added get version methodto extension” [test/mediawiki/extensions/examples](master) - https://gerrit.wikimedia.org/r/9332
7.9.1 git-review complains about multiple commits
If git review asks you if you really want to submit multiplecommits, and lists a bunch of unrelated commits fromdifferent branches, try either of these:
git fetch --all git remote update
Both commands do exactly the same thing, they fetch ob-
jects from all remote repositories set. So just pick thecommand you remember easily and forget about the otherone.
https://gerrit.wikimedia.org/r/9332https://gerrit.wikimedia.org/r/gitweb?p=test%252Fmediawiki%252Fextensions%252Fexamples.git;a=commit;h=7b7840b470961405bf0560d645fe6b39d848601chttps://gerrit.wikimedia.org/r/gitweb?p=test%252Fmediawiki%252Fextensions%252Fexamples.git;a=commit;h=fee9e992a68d285a727e39608cb608e535bcc10a
8/18/2019 Gerrit Tutorial
11/16
7.10 Push using HTTPS 11
7.9.2 git complains “you are in the middle of a
merge -- cannot amend”
When after rebasing and merging your
git commit --amend
results in
message: fatal: You arein the middle of a merge -- cannotamend.
apply these steps and reapply your changesgit stash git reset --hard git checkout master git review -d git stash pop git commit -a --amend
If, after git review jenkins-bot emails This change wasunable to be automatically merged with the current state
of the repository. Please rebase your change and up-
load a new patchset. This might mean that server masterbranch now has merge conflicts with your patch. Checkadvanced Gerrit usage to see how to fix them.
7.10 Push using HTTPS
This method is helpful for submitting to changes to Gerritwhen SSH is not functional.
For this the user needs the HTTP Password which can begenerated in the Account Settings of Gerrit under the tabof HTTP Password. After generating the password thedeveloper should commit all the changes for one patchunder one single commit and use
git push https://gerrit.wikimedia.org/r/p/mediawiki/coreHEAD:refs/for/master
The authentication credentials need to be entered to suc-
cessfully submit the changes. The syntax given aboveis for Mediawiki core and will vary for extensions ac-cordingly. For example if one is pushing to Extention:LiquidThreads then
git push https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LiquidThreads HEAD:refs/for/master
7.10.1 Commit Hook and Change-ID
A major problem that arises when using HTTPS for sub-mitting changes is that commit hook is not automatically
attached. A hack for this approach is to make one failattempt to push. On doing so, the error message will au-tomatically highlight the Change-Id, see below example:
Username for 'https://gerrit.wikimedia.org': xxxxxxPassword for 'https://xxxxxx@gerrit.wikimedia.org':Counting objects: 25, done.Delta compression using up to 2 threads.Compressing objects: 100% (4/4), done.Writing objects: 100% (4/4), 448 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)remote: Resolving deltas: 100% (3/3)remote: Processing changes: refs: 1, doneremote: ERROR: missing Change-Id in commit messagefooterremote: Suggestion for commit message:remote: Commit message appears hereremote:remote: Change-Id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxremote:remote: Hint: To automatically insert Change-Id, installthe hook:
remote: gitdir=$(git rev-parse --git-dir); scp -p -P 29418xxxxxx@gerrit.wikimedia.org:hooks/commit-msg${gitdir}/hooks/remote:remote:To https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Test! [remote rejected] HEAD -> refs/for/master (missingChange-Id in commit message footer)error: failed to push some refs to
Now copy the change ID and amend your commit. Al-ways add Change-ID as the last line of your commit mes-
sage.git commit --amend
This will open an editor to change the commit message.Paste the Change-Id as the last line of the message andsave it. See example:
Your commit summaryYour commit messageBug: TxxxxxChange-Id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Now you can successfully push to Gerrit.
Automatically adding commit Hook To obtain thecommit-msg script:
scp -p -P 29418 USERNAME@gerrit.wikimedia.org:hooks/commit-msg /.git/hooks/
See https://gerrit.wikimedia.org/r/Documentation/cmd-hook-commit-msg.html for details.
7.10.2 Proxy servers
This section is untested; please update this section with
updated information if issues arise
If you are behind a proxy server, you also need to
https://gerrit.wikimedia.org/r/Documentation/cmd-hook-commit-msg.htmlhttps://gerrit.wikimedia.org/r/Documentation/cmd-hook-commit-msg.htmlhttps://gerrit.wikimedia.org/r/p/mediawiki/extensions/Testhttps://gerrit.wikimedia.org/r/p/mediawiki/extensions/Testhttps://xxxxxx@gerrit.wikimedia.org/%2527https://gerrit.wikimedia.org/%2527https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LiquidThreadshttps://gerrit.wikimedia.org/r/p/mediawiki/extensions/LiquidThreadshttps://gerrit.wikimedia.org/r/p/mediawiki/corehttps://www.mediawiki.org/wiki/Gerrit/Advanced_usage
8/18/2019 Gerrit Tutorial
12/16
12 8 HOW WE REVIEW CODE
clone over HTTPS. Make sure the environment variableHTTPS_PROXY is set correctly. To debug issues, tryrunning with GIT_CURL_VERBOSE=1, e.g.
GIT_CURL_VERBOSE=1 git clone https://gerrit.wikimedia.org/r/pywikibot/core.git
In case of issues, try providing HTTPS_PROXY directly,e.g.
HTTPS_PROXY=proxy_serverGIT_CURL_VERBOSE=1 git clone https://gerrit.wikimedia.org/r/mediawiki/core.git
or use git’s options directly:
GIT_CURL_VERBOSE=1 git -chttp.proxy="proxy_server” clone https://gerrit.wikimedia.org/r/mediawiki/core.git
This last option should also work for SOCKS proxyservers, using
GIT_CURL_VERBOSE=1 git -c http.proxy="socks5://socks_server" clone https://gerrit.wikimedia.org/r/mediawiki/core.git
7.11 Diff algorithm
Gerrit uses jGit’s diff , which uses a slightly different diffalgorithm from git’s default diff algorithm.
To see roughly what a patch will look like in Gerrit, runjgit show -w.
If jgit isnt available in your packaging system, down-load jgit.sh from https://eclipse.org/jgit/download/ anduse jgit.sh instead of jgit.
8 How we review code
Code review is an essential part of our contribution work-flow. The principle is basic: any patch must be reviewedby others before being merged.
This means that your code will need reviewers. Checkour advice for getting reviews.
8.1 Review before merge
It’s important to us to have a review-before-mergework-flow for MediaWiki core and also for any extension wedeploy. We will also offer that option to any extension au-
thor who wants it for their extension. The oneexception islocalisation and internationalisation commits, which willbe able to be pushed without review.
8.2 Who can review? Gerrit project own-
ers
Who has the ability to do code review?
We use gerrit.wikimedia.org to manage code review.
Anyone can ask for a Gerrit account – get one!. WithinGerrit, anyone can comment on commits and signal theircriticisms and approvals. Anyone can give a nonbinding"+1” to any commit. However, for any given repository(“Gerrit project”), only a small group of people will havethe ability to approve code within Gerrit and merge it intothe repository. This superapproval is a "+2" even thoughthat’s a misleading name, because two +1 approvals DONOT add up to a +2. These people are “Gerrit projectowners”. Learn about becoming a Gerrit project owner.
Even within a Gerrit project, we can also specify partic-ular branches that only specific people can pull into.
8.3 How to comment on, review, and merge
code in Gerrit
A sample changeset, with annotations
Side-by-side diff
Anyone can comment on code in Gerrit.
Gerrit comments may disappear in the future: youmay prefer keeping your comments/discussions onPhabricator or a wiki instead, if you think they're worth
https://www.mediawiki.org/wiki/Phabricatorhttps://phabricator.wikimedia.org/T18https://www.mediawiki.org/wiki/Gerrit/Project_ownershiphttps://www.mediawiki.org/wiki/+2https://www.mediawiki.org/wiki/Developer_accesshttps://gerrit.wikimedia.org/https://www.mediawiki.org/wiki/I18nhttps://www.mediawiki.org/wiki/Manual:Extensionshttps://en.wikipedia.org/wiki/Wikimedia%2520Foundationhttps://www.mediawiki.org/wiki/Manual:Extensionshttps://en.wikipedia.org/wiki/MediaWikihttps://www.mediawiki.org/wiki/Gerrit/Code_review/Getting_reviewshttps://www.mediawiki.org/wiki/Gerrit/Code_reviewhttps://eclipse.org/jgit/download/
8/18/2019 Gerrit Tutorial
13/16
8.3 How to comment on, review, and merge code in Gerrit 13
Review screen
preserving.
8.3.1 Viewing and commenting on code
• Make sure you have a https://gerrit.wikimedia.orglogin (Get an account!). If you don't know, try log-ging in at https://wikitech.wikimedia.org; the user-name andpasswordshould be the same. If you can't,ask in #mediawikiconnect for someone to help.
• Log in to Gerrit. If you know the changeset youwant to look at (URL will look like https://gerrit.wikimedia.org/r/#change,8939 ), go to that. Other-wise, use the search box and try searching. There isno fulltext search in Gerrit, but you cansearch byau-thor (“Owner”), Gerrit project, branch, changesetsyou've starred, etc. The Gerrit search documenta-tion covers all of the different search operators youcan use.
• The changeset has a few important fields, links andbuttons:
• Reviewers. 'jenkins-bot' is the autoreviewerthat auto-verifies anything that passes theJenkins tests. It will report a red or green markdepending on whether the build passes.
• Add reviewer. Manually pings someone to re-quest their review. It'll show up in their Gerritdashboard.
• Side-by-side diff. Opens the diff. You candouble-click on a line and comment on thatline, then save a draft comment! Then, click“Up to change” to go back to the changeset,proceed to .
• Review (“Add comment”). Publish yourthoughts on the commit, including an overallcomment and/or inline comments you added(see above).
• If, upon code review, you approve, use"+1” under Code Review; otherwise, use"−1” to disapprove. These numbers are
nonbinding, won't cause merges or rejec-tions, and have no formal effect on thecode review.
• Abandon change (you'll see this if you wrotethis diff). This action removes the diff fromthe merge queue, but leaves it in Gerrit forarchival purposes.
8.3.2 Comparing patch sets
Every time you amend your commit and submit it for re-view, a new patch set is created. You can compare thedifferent patch sets like this:
• Select the older patch set in the “Old Version His-tory” list.
• Expand the newer patch set details by clicking thearrow near it.
• Click Side-by-Side. Note that in Gerrit 2.3 this onlyworks if you open the diff in the same tab, so don'topen it in a new tab.
8.3.3 Formally reviewing and merging or rejecting
code
If you are one of the Gerrit project owners, you'll also see:
A Gerrit review screen with approval and veto options
• Abandon Change button
• on the Review page, additional CodeReview options to +2 (approve) or −2(veto) a diff, and a Publish And Sub-mit button (publish your comment andmerge diff into the branch, in 1 step)
• Submit Patch Set 1 button (merge --only useful if you or someone else has al-ready given a +2 approval to the diff, butnot merged it)
And once you've merged something into theexample Gerrit project you'll see it in https:
https://gerrit.wikimedia.org/r/gitweb?p=test/mediawiki/extensions/examples.git;a=summaryhttps://gerrit.wikimedia.org/r/#minehttps://gerrit.wikimedia.org/r/#minehttps://gerrit.wikimedia.org/r/Documentation/user-search.htmlhttps://gerrit.wikimedia.org/r/Documentation/user-search.htmlhttps://gerrit.wikimedia.org/r/#change,8939https://gerrit.wikimedia.org/r/#change,8939https://gerrit.wikimedia.org/https://webchat.freenode.net/?channels=#mediawikihttp://ircs//irc.freenode.net/mediawikihttps://wikitech.wikimedia.org/https://www.mediawiki.org/wiki/Developer_accesshttps://gerrit.wikimedia.org/
8/18/2019 Gerrit Tutorial
14/16
14 10 SEE ALSO
//gerrit.wikimedia.org/r/gitweb?p=test/mediawiki/extensions/examples.git;a=summary .
If you merge a commit that references a ticket in Phabri-cator, please go to that ticket and mark it RESOLVEDand reference the merge ID.
9 Troubleshooting
9.1 Problems encountered installing
commit-msg hook
If you encounter this error when trying to push changesusing git-review, you are not working with a repositorythat was cloned via ssh. You must clonerepositories usingssh, not http or https, to succesfully push changes usinggit-review.
9.2 Unable to negotiate with [IP]: no
matching key exchange method found.
Their offer: diffie-hellman-group1-
sha1
This message will appear if you are using openssh >= 7.0.For more information, see task T112025.
10 See also
Also useful are these pages:
• Git and gerrit in Wikimedia labs
• An intro-to-git “training mission”
• An introduction to git-svnfor Subversion/SVK usersby Sam Vilain
• GitMagic A git guide with translations
•
A git branching model• Git: the simple guide
• Git Community Book will take you gently into Gitinternals. (It is hard to “get” git until knowing some-thing about how it works internally. After this, ev-erything become simple, just hidden without convo-luted and anti-productive user interface.)
• How we're going to use Git slides by Brion Vibber,as presented autumn 2011
•
Audio from Git presentation by BrionVibber, autumn 2011
• Notes from Brion Vibber’s presentation
• Git’s website with documentation
• Pro Git book
• MediaWiki Git Guide (MGG) - selection of relevant
Git pages in the MW Virtual Library• A very useful Git guide
• Also useful (if you subtract away GitHub stuff)
• https://gerrit.wikimedia.org/r/#q,status:open,n,z -wikimedia bug list
• Download from Git
• labsconsole:Help:Access
• Gerrit
• Gerrit/git-review• Gerrit/Getting started
• Gerrit/TortoiseGit tutorial
• Wikimedia Gerrit Patch Uploader
https://tools.wmflabs.org/gerrit-patch-uploader/https://www.mediawiki.org/wiki/Gerrit/TortoiseGit_tutorialhttps://www.mediawiki.org/wiki/Gerrit/Getting_startedhttps://www.mediawiki.org/wiki/Gerrit/git-reviewhttps://www.mediawiki.org/wiki/Gerrithttps://wikitech.wikimedia.org/wiki/Help:Accesshttps://www.mediawiki.org/wiki/Download_from_Githttps://gerrit.wikimedia.org/r/#q,status:open,n,zhttp://wiki.openstack.org/GerritJenkinsGithubhttp://sitaramc.github.com/gcs/index.htmlhttps://www.mediawiki.org/wiki/Category:Githttps://www.mediawiki.org/wiki/Manual:MediaWiki_Git_Guidehttp://www.git-scm.com/book/en/http://gitscm.org/https://www.mediawiki.org/wiki/NOLA_Hackathon/Sunday#Git_stuffhttps://www.mediawiki.org/wiki/File:Git_notes_-_NOLA_Hackathon_2011.ogahttps://www.mediawiki.org/wiki/File:Git_notes_-_NOLA_Hackathon_2011.pdfhttps://github.s3.amazonaws.com/media/book.pdfhttp://rogerdudler.github.com/git-guide/http://nvie.com/posts/a-successful-git-branching-model/http://www-cs-students.stanford.edu/~blynn/gitmagic/http://utsl.gen.nz/talks/git-svn/intro.htmlhttp://openhatch.org/missions/githttps://wikitech.wikimedia.org/wiki/Githttps://phabricator.wikimedia.org/T112025https://gerrit.wikimedia.org/r/gitweb?p=test/mediawiki/extensions/examples.git;a=summaryhttps://gerrit.wikimedia.org/r/gitweb?p=test/mediawiki/extensions/examples.git;a=summary
8/18/2019 Gerrit Tutorial
15/16
15
11 Text and image sources, contributors, and licenses
11.1 Text
• Gerrit/Tutorial Source: https://www.mediawiki.org/wiki/Gerrit/Tutorial?oldid=2057060 Contributors: Hashar, Wikinaut, Elvey, Skier-page, Purodha, Rogerhc, Turnstep, John Vandenberg, Mattflaschen, Amire80, Cacycle, FunPika, Waldir, ^demon, Saper, Dereckson,Wargo, GrafZahl, Peachey88, Valhallasw, Kaldari, He7d3r, Multichill, Matěj Grabovský, Aude, DrTrigon, Nemo bis, Whym, Xqt, Gre-gRundlett, Giftpflanze, Krinkle, Wizardist, *devunt, Ijon, Varnent, Awjrichards, RobLa-WMF, Steven (WMF), Niedzielski, Daniel Kinzler(WMDE), Petrb, Sumanah, Yuvipanda, Qgil-WMF, Preilly, Van de Bugger, Wctaiwan, Base, श ंतन,ू Shirayuki, Jamesmontalvo3, Kre-nair, MarkTraceur, Danielle Benoit, Leucosticte, KevinCole, SPage (WMF), UltrasonicNXT, Malyacko, Mattsmith321, Sharihareswara(WMF), Florianschmidtwelzow, Bcharles, Cblair91, AKlapper (WMF), Suriyaa Kudo, Ckoerner, Glaisher, Wmdv, 01tonythomas, 5xbe,Xue Fuqiao, Adi.iiita, Guymontag~mediawikiwiki, Tedsa, Firebus, Nuwanga82, Snailtsunami, Jonas.keutel, VEckl (WMF), MHolloway(WMF), TJones (WMF), Dwlocks, JadeMaveric, Dhshzj and Anonymous: 27
11.2 Images
• File:Apt-get_install_python-pip.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/a/a8/Apt-get_install_python-pip.pngLicense: CC-BY-SA-2.5 Contributors: ? Original artist: ?
• File:Cat_id_rsa.pub.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/7/7e/Cat_id_rsa.pub.png License: PD Contributors: ? Original artist: ?
• File:Chrome_diff_9332.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/0/0b/Chrome_diff_9332.png License: CC-BY-SA-2.5 Contributors: ? Original artist: ?
• File:Chrome_gerrit_9332.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/e/e5/Chrome_gerrit_9332.png License: CC-BY-SA-2.5 Contributors: ? Original artist: ?
• File:Chrome_gerrit_9332_2.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/9/94/Chrome_gerrit_9332_2.png License: CC-BY-SA-2.5 Contributors: ? Original artist: ?
• File:Chrome_review_9332.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/3/38/Chrome_review_9332.png License: CC-BY-SA-2.5 Contributors: ? Original artist: ?
• File:Gerrit.svg Source: https://upload.wikimedia.org/wikipedia/mediawiki/a/a7/Gerrit.svg License: PD Contributors: ? Original artist: ?
• File:Git_clone.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/d/d0/Git_clone.png License: PD Contributors: ? Original artist: ?
• File:Git_commit.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/d/d9/Git_commit.png License: PD Contributors: ?Original artist: ?
• File:Git_commit_amend.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/8/82/Git_commit_amend.png License: PDContributors: ? Original artist: ?
• File:Git_commit_vim.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/f/f6/Git_commit_vim.png License: PD Contribu-tors: ? Original artist: ?
• File:Git_config_-l.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/d/de/Git_config_-l.png License: CC-BY-SA-2.5Contributors: ? Original artist: ?
• File:Git_config_email_and_username.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/0/0c/Git_config_email_and_username.png License: CC-BY-SA-2.5 Contributors: ? Original artist: ?
• File:Git_diff.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/b/b2/Git_diff.png License: ? Contributors: ? Originalartist: ?
• File:Git_diff_--cached.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/c/c0/Git_diff_--cached.png License: ? Contrib-utors: ? Original artist: ?
• File:Git_pull_origin_master.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/4/43/Git_pull_origin_master.png License: PD Contributors: ? Original artist: ?
• File:Git_rebase_master.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/9/9a/Git_rebase_master.png License: PD Con-tributors: ? Original artist: ?
• File:Git_remote_update.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/f/f6/Git_remote_update.png License: PD Con-tributors: ? Original artist: ?
• File:Git_review_-R.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/9/95/Git_review_-R.png License: PD Contributors: ? Original artist: ?
• File:Git_review_-R_2.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/b/b4/Git_review_-R_2.png License: PD Contrib-utors: ? Original artist: ?
• File:Git_review_-d_9332.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/9/99/Git_review_-d_9332.png License: PDContributors: ? Original artist: ?
• File:Git_review_-s.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/2/26/Git_review_-s.png License: CC-BY-SA-2.5Contributors: ? Original artist: ?
• File:Git_status.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/d/de/Git_status.png License: PD Contributors: ? Original artist: ?
• File:Git_status_2.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/8/8f/Git_status_2.png License: PD Contributors: ?Original artist: ?
https://upload.wikimedia.org/wikipedia/mediawiki/8/8f/Git_status_2.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/d/de/Git_status.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/2/26/Git_review_-s.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/9/99/Git_review_-d_9332.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/b/b4/Git_review_-R_2.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/9/95/Git_review_-R.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/f/f6/Git_remote_update.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/9/9a/Git_rebase_master.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/4/43/Git_pull_origin_master.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/c/c0/Git_diff_--cached.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/b/b2/Git_diff.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/0/0c/Git_config_email_and_username.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/0/0c/Git_config_email_and_username.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/d/de/Git_config_-l.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/f/f6/Git_commit_vim.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/8/82/Git_commit_amend.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/d/d9/Git_commit.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/d/d0/Git_clone.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/a/a7/Gerrit.svghttps://upload.wikimedia.org/wikipedia/mediawiki/3/38/Chrome_review_9332.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/9/94/Chrome_gerrit_9332_2.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/e/e5/Chrome_gerrit_9332.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/0/0b/Chrome_diff_9332.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/7/7e/Cat_id_rsa.pub.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/a/a8/Apt-get_install_python-pip.pnghttps://www.mediawiki.org/wiki/Gerrit/Tutorial?oldid=2057060
8/18/2019 Gerrit Tutorial
16/16
16 11 TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES
• File:Maitre_du_feu.jpg Source: https://upload.wikimedia.org/wikipedia/commons/9/95/Maitre_du_feu.jpg License: CC BY-SA 2.5Contributors: No machine-readable source provided. Own work assumed (based on copyright claims). Original artist: No machine-readableauthor provided. Jrpac~commonswiki assumed (based on copyright claims).
• File:Pip_install_git-review.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/b/b4/Pip_install_git-review.png License: CC-BY-SA-2.5 Contributors: ? Original artist: ?
• File:Screen_Shot_2012-05-25_at_10.39.36_AM.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/b/b1/Sudo_apt-get_
install_git-core.png License:
PD Contributors:
? Original artist:
?• File:Ssh-keygen_-t_rsa_-C_\char"0022\relax{}your_email@youremail.com”.png Source: https://upload.wikimedia.org/wikipedia/
mediawiki/a/a8/Ssh-keygen_-t_rsa_-C_%22your_email%40youremail.com%22.png License: PD Contributors: ? Original artist: ?
• File:Vim_example.body_file.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/2/28/Vim_example.body_file.png Li-cense: ? Contributors: ? Original artist: ?
• File:Vim_git_commit_amend.png Source: https://upload.wikimedia.org/wikipedia/mediawiki/3/3c/Vim_git_commit_amend.png Li-cense: PD Contributors: ? Original artist: ?
11.3 Content license
• Creative Commons Attribution-Share Alike 3.0
https://creativecommons.org/licenses/by-sa/3.0/https://upload.wikimedia.org/wikipedia/mediawiki/3/3c/Vim_git_commit_amend.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/2/28/Vim_example.body_file.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/a/a8/Ssh-keygen_-t_rsa_-C_%2522your_email%2540youremail.com%2522.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/a/a8/Ssh-keygen_-t_rsa_-C_%2522your_email%2540youremail.com%2522.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/b/b1/Sudo_apt-get_install_git-core.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/b/b1/Sudo_apt-get_install_git-core.pnghttps://upload.wikimedia.org/wikipedia/mediawiki/b/b4/Pip_install_git-review.pnghttp://localhost/var/www/apps/conversion/tmp/scratch_3//commons.wikimedia.org/wiki/User:Jrpac~commonswikihttps://upload.wikimedia.org/wikipedia/commons/9/95/Maitre_du_feu.jpg
top related