Gerrit » History » Version 4
zecke, 05/09/2016 09:35 PM
1 | 1 | zecke | h1. Contributing using Gerrit |
---|---|---|---|
2 | |||
3 | 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. |
||
4 | |||
5 | h2. Subprojects using Gerrit |
||
6 | |||
7 | The following projects use Gerrit to contribute changes: |
||
8 | |||
9 | * libosmocore.git |
||
10 | * libosmo-abis.git |
||
11 | * libosmo-netif.git |
||
12 | 4 | zecke | * libosmo-sccp.git |
13 | 1 | zecke | * libsmpp34.git |
14 | * openbsc.git |
||
15 | * osmo-bts.git |
||
16 | * osmo-iuh.git |
||
17 | * osmo-pcu.git |
||
18 | * cellmgr-ng.git |
||
19 | |||
20 | h2. Configuring Gerrit/Account |
||
21 | |||
22 | 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: |
||
23 | |||
24 | * Pick a username (can not be changed) |
||
25 | * Add your public ssh key(s) |
||
26 | * Add email addresses you intend to use as author/comitter |
||
27 | |||
28 | h2. Setting up Gerrit for commits and pushing |
||
29 | |||
30 | 2 | zecke | * Add the remote to be able to fetch and push to gerrit |
31 | * Fetch the commit hook that adds Change-Id to each commit to uniquely identify a commit |
||
32 | |||
33 | <pre> |
||
34 | git remote add gerrit ssh://USERNAME@gerrit.osmocom.org:29418/PROJECT.git |
||
35 | 3 | zecke | scp -P 29418 USERNAME@gerrit.osmocom.org:hooks/commit-msg .git/hooks/ |
36 | 2 | zecke | git push gerrit HEAD:refs/for/master (push for review) |
37 | git push gerrit HEAD:refs/heads/user/topic (push a user branch) |
||
38 | git push gerrit HEAD:refs/heads/master (directly push to master if you are allowed to) |
||
39 | git ls-remote gerrit (to list all changesets and patches) |
||
40 | </pre> |