From XennisWiki
Jump to: navigation, search

Gerrit is a free, web-based team code collaboration tool. Software developers in a team can review each other's modifications on their source code using a Web browser and approve or reject those changes. It integrates closely with Git, a distributed version control system. (Wikipedia)

Usage with Git

Push new branch

Create a new branch named development/new.

git push origin HEAD:refs/heads/development/new

Push review

git push origin HEAD:refs/for/master

Push draft

git push origin HEAD:refs/drafts/master

Define a remote

Add in .git/config

[remote "review-master"]
    url = gerrit:exampleRepo.git
    push = HEAD:refs/for/master

Usage: git push review-master


Garbage collection

Further information: gerrit gc

Run garbage collection for all projects

ssh -p <port> <host> gerrit gc --all --show-progress


Right to create a new branch

  • Reference: refs/heads/* > Create Reference

Errors and problems

Delete a project

Delete the Git

rm -r review_site/git/project-to-delete.git

Flush the cache

ssh -p <port> <host> gerrit flush-caches --cache projects

See also

External links