Project

General

Profile

Gerrit » History » Version 3

zecke, 05/08/2016 10:14 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
* libsmpp34.git
13
* openbsc.git
14
* osmo-bts.git
15
* osmo-iuh.git
16
* osmo-pcu.git
17
* cellmgr-ng.git
18
 
19
h2. Configuring Gerrit/Account
20
21
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:
22
23
* Pick a username (can not be changed)
24
* Add your public ssh key(s)
25
* Add email addresses you intend to use as author/comitter
26
27
h2. Setting up Gerrit for commits and pushing
28
29 2 zecke
* Add the remote to be able to fetch and push to gerrit
30
* Fetch the commit hook that adds Change-Id to each commit to uniquely identify a commit
31
32
<pre>
33
git remote add gerrit ssh://USERNAME@gerrit.osmocom.org:29418/PROJECT.git
34 3 zecke
scp -P 29418 USERNAME@gerrit.osmocom.org:hooks/commit-msg .git/hooks/
35 2 zecke
git push gerrit HEAD:refs/for/master (push for review)
36
git push gerrit HEAD:refs/heads/user/topic (push a user branch)
37
git push gerrit HEAD:refs/heads/master (directly push to master if you are allowed to)
38
git ls-remote gerrit (to list all changesets and patches)
39
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)