Login | Register
My pages Projects Community openCollabNet

Wiki: Diff for "Using GIT and Gerrit"

2020-04-07: This site is going to be decommissioned and shut down on 2020-07-01. Please copy and archive any data you wish to keep before that date.

Edit this page | Links to this page | Page information | Attachments | Refresh page


Differences between revisions 13 and 14 (spanning 2 versions)

Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
It is now also possible to contribute to the argouml projects through Gerrit.
This also means that you will be using git instead of subversion so
it is also an option for those that prefer git.
This approach has some [:/Advocacy:pros and cons].

Here is a short introduction on how to do it:
 1. Register on the [https://argouml-jenkins1.no-ip.biz:8443/ Gerrit server] and create your Gerrit user, set-up your email, register your public ssh-key with this user. (One time only.)
 1. Clone the git repository '''git clone ssh://''your_gerrit_user''@argouml-jenkins1.no-ip.biz:29418/''project'' ''project''''', and '''cd ''project'''''. (One time per machine you are working on. This takes more than 3 minutes and uses 320Meg for the main '''argouml''' project.). For more work using the same machine, you can pull down updates using '''git pull''' and '''git rebase origin/trunk'''.
 1. Create a local git branch for your work and switch to it '''git branch ''work''''', '''git checkout ''work'''''.
 1. Do your work.
 1. Run the tests ('''mvn test''', '''mvn exec:java''', ...)
 1. Check into your git repository using a single commit '''git add ...''', '''git commit -m'Message' ''' if needed followed by a sequence of commit amends '''git commit --amend'''.
 1. Push your Patch Set to the Gerrit server for review '''git push origin HEAD:refs/for/trunk'''. This will fail and suggest a Change-Id if you havn't provided on.
 1. After your commit, you will get mails from the Gerrit server with information on the Continuous Integration job and other review comments. Monitor the Gerrit server to take part in any discussion of your changes.
 1. If you need to push an updated Patch Set to replace the previous Patch Set commit using '''git commit --amend''' and push again '''git push origin HEAD:refs/for/trunk'''. This relies on the Change-Id in the commit message to identify the change. The Gerrit server will pick up on the Change-Id and treat this as a replacement Patch Set.
 1. When a Gerrit Approver has approved your change, it is automatically checked into the subversion repository.

== Syntax of commit message ==
Short sentence[[BR]]
<empty line>[[BR]]
Full explanation[[BR]]
Contributed-by: [[BR]]
Change-Id: [[BR]]
[Submitted-by:] [[BR]]
This option is no longer available.

This option is no longer available.

Using GIT and Gerrit (last edited 2018-04-29 13:08:58 -0700 by linus)