Gerrit » History » Revision 2
Revision 1 (zecke, 05/08/2016 05:51 PM) → Revision 2/130 (zecke, 05/08/2016 05:53 PM)
h1. Contributing using Gerrit Gerrit is a review tool that integrates nicely with git and ssh. Instead of manually uploading a change, one can push it for review. One can use ssh to trigger review and actions. h2. Subprojects using Gerrit The following projects use Gerrit to contribute changes: * libosmocore.git * libosmo-abis.git * libosmo-netif.git * libsmpp34.git * openbsc.git * osmo-bts.git * osmo-iuh.git * osmo-pcu.git * cellmgr-ng.git h2. Configuring Gerrit/Account You will need to sign-up at https://gerrit.osmocom.org/login/. If you have an Osmocom Redmine account you can use https://osmocom.org/openid as OpenID provider. After the initial sign-up you will need to: * Pick a username (can not be changed) * Add your public ssh key(s) * Add email addresses you intend to use as author/comitter h2. Setting up Gerrit for commits and pushing * Add the remote to be able to fetch and push to @git remote add gerrit ssh://USERNAME@gerrit.osmocom.org:29418/PROJECT.git@ * Fetch the a commit hook that adds Change-Id to each commit to uniquely identify a commit <pre> git remote auto add gerrit ssh://USERNAME@gerrit.osmocom.org:29418/PROJECT.git scp "Change-Id: ...". @scp -P 29418 USERNAME@gerrit.osmocom.org:hooks/commit-hook .git/hooks/ .git/hooks/@ git push gerrit HEAD:refs/for/master (push * Push your current branch to be considered for review) git master @git push gerrit HEAD:refs/heads/user/topic (push HEAD:refs/for/master@ * Push a work in progress user branch) git branch @git push gerrit HEAD:refs/heads/master (directly push to master if you are allowed to) git ls-remote gerrit (to list all changesets and patches) </pre> HEAD:refs/heads/user/topic@