Gerrit Tutorial on Gerrit Setting Up GitReview

git-review can be used to send git branches to gerrit for reviewing. you can set up gitreview using the following command in the project directory.

$ git review -s

git-review can be used as the command line tool for configuring git clone, submitting the branches to gerrit, fetching the existing files, etc. git-review looks for the remote named gerrit for working with gerrit by default.

if git-review finds the gerrit remote, then it will submit the branch to head:refs/for/master at the remote location and if there is no gerrit remote access, then git-review looks for the .gitreview file at the root of the repository along with the gerrit remote information.

git-review processes the following internally −

  • it will check whether the remote repository works or not for submitting the branches.

  • if there is no gerrit remote access, then it will ask for the username and try to access the repository again.

  • it will create a remote access called gerrit that points to gerrit.

  • it will install the commit-msg hook.