Many projects have enabled [http://git.eclipse.org/r Gerrit] to review contributions. When Gerrit is available, it uses a specific repository URL, which should be listed on the contribution page of the project. The general pattern for Gerrit at Eclipse.org URL is <tt>ssh://username@git.eclipse.org:29418/path/to/repo.git</tt>, so you can add a reference to Gerrit for your repo using <tt>git remote add gerrit ssh://username@git.eclipse.org:29418/path/to/repo.git</tt>

Many projects have enabled [http://git.eclipse.org/r Gerrit] to review contributions. When Gerrit is available, it uses a specific repository URL, which should be listed on the contribution page of the project. The general pattern for Gerrit at Eclipse.org URL is <tt>ssh://username@git.eclipse.org:29418/path/to/repo.git</tt>, so you can add a reference to Gerrit for your repo using <tt>git remote add gerrit ssh://username@git.eclipse.org:29418/path/to/repo.git</tt>

−

A rule with Gerrit is that you push should push a '''single commit'''. If you wish to push another version of an existing Gerrit patch, make sure it has the '''same Change-Id''' in commit message footer so Gerrit will understand it as another version and not as a new contribution. The best way to make sure it uses the same Change-Id is to prefer using <tt>git commit --amend</tt> to modify the existing commit and then re-push it.

+

A rule with Gerrit is that you should push a '''single commit'''. If you wish to push another version of for an existing Gerrit review, make sure it has the '''same Change-Id''' in commit message footer so Gerrit will understand it as another version and not as a new contribution. The best way to make sure it uses the same Change-Id is to prefer using <tt>git commit --amend</tt> to modify the existing commit and then re-push it.

Then you can simply push new patches to Gerrit using <tt>git push gerrit HEAD:refs/for/master</tt>. It will check CLAs and other stuff, and if you commit gets accepted by this automatic checks, it will return you the URL for your change. Code review and developer interactions will happen on that change. You should receive notifications on each change, but in case you don't, please monitor the change at the given URL to react promptly to questions.

Then you can simply push new patches to Gerrit using <tt>git push gerrit HEAD:refs/for/master</tt>. It will check CLAs and other stuff, and if you commit gets accepted by this automatic checks, it will return you the URL for your change. Code review and developer interactions will happen on that change. You should receive notifications on each change, but in case you don't, please monitor the change at the given URL to react promptly to questions.

Line 106:

Line 106:

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=410937

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=410937

Also-by: Some Otherperson <otherperson@someplace.net>

Also-by: Some Otherperson <otherperson@someplace.net>

−

== via Bugzilla==

== via Bugzilla==

Revision as of 09:48, 7 October 2013

This page is for individuals who want to make a contribution to an Eclipse project via Git or Gerrit.

Be sure to use the same email address when you register for the account that you intend to use on Git commit records.

The Commit Record

If a project supports Gerrit, you can push directly to that project's repository. Alternatively, if you have a public Git repository, a project committer can pull your contribution.

Minimally, your Git commit record must have the following:

Your credentials (email address) captured in the "Author" field;

A single line summary in the message field, followed by a more detailed descriptive paragraph; and

A "Signed-off-by" entry with matching credentials in the message footer.

If applicable, a link to the Bug that is addressed by the commit should be included in the message footer. The id (bug number) of the bug should also be included in the message summary (in square braces).

You can specify additional authors using one or more "Also-by" entries in the message footer.

A rule with Gerrit is that you should push a single commit. If you wish to push another version of for an existing Gerrit review, make sure it has the same Change-Id in commit message footer so Gerrit will understand it as another version and not as a new contribution. The best way to make sure it uses the same Change-Id is to prefer using git commit --amend to modify the existing commit and then re-push it.

Then you can simply push new patches to Gerrit using git push gerrit HEAD:refs/for/master. It will check CLAs and other stuff, and if you commit gets accepted by this automatic checks, it will return you the URL for your change. Code review and developer interactions will happen on that change. You should receive notifications on each change, but in case you don't, please monitor the change at the given URL to react promptly to questions.

Gerrit first contribution FAQ:

I have a CLA; why can't I push to Gerrit?:

First check the email address that you're using on the commit record. It must match the email address you use on your Eclipse Foundation account.

We have noticed an issue with Gerrit caching that sometimes introduces latency in the ability for Gerrit to recognize that you have a CLA. This may affect you if you've very recently signed a CLA. Please see bug 407114.

The commit is properly signed-off; why is it being rejected?: The "Signed-off-by" entry must be in the footer of the commit message. This is the last block of text in the commit message; it cannot contain blank lines. See bug 412140. For example, pushing the following commit to Gerrit will fail because the "Signed-off-by" entry is not considered part of the footer (it is separated from the footer by a blank line):

via Bugzilla

If you cannot push to a project's Gerrit repository, or do not have a public Git repository from which a project committer can pull, you can submit your contribution as a patch attachment on a Bugzilla record.

A Word about Eclipse Foundation Accounts

The Eclipse Foundation maintains multiple separate forges. The same user account applies for all forges. If you, for example, create an account on eclipse.org, that same account can be used on LocationTech or PolarSys. A signed CLA is connected to your Eclipse Foundation account; this means that with the single valid CLA on file, you can contribute to any project on any of the forges.