0

I want to commit my changes in Eclipse (using Git and Gerrit), but I can't generate any changeId that is necessary for the commit process. I haven't found any link during my online search. I checked the keys, I integrated in Eclipse, I can access to the Gerrit Git server without any problem.

Any Idea?

Best

Tron
  • 59
  • 2
  • 12
  • 1
    Did you install the [commit-msg hook](https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/user-changeid.html#creation) in your Git repository? It should generate the `Change-Id:`-lines automatically. – helmbert Apr 21 '15 at 11:30
  • It works now. I was irritated by the changeID I00000...so we could close this issue. Thanks. – Tron Apr 22 '15 at 11:44
  • 1
    Great! If you found a solution yourself, it is completely acceptable for you to write and accept an answer for your own question. – helmbert Apr 22 '15 at 11:46
  • @helmbert wondering how did you solve this problem? – imapollo Jan 14 '16 at 05:59
  • This might be a bug in egit, for me also not working. – Shashi Ranjan Apr 18 '17 at 06:56

1 Answers1

0

Just for the record:

For the Eclipse EGerrit plugin to work one must:

  1. Install the git commit hook as described here
  2. Click on "Add Change-id" button in Eclipse as pictured

EGerrit "Add Change-id" button location

This will generate an empty change id full of zeroes, which will be replaced automatically with the actual change id after you commit.

  1. If you want gerrit to insert it automatically make sure the file [your_project]/.git/config contains

[gerrit]
createchangeid = true

(The createchangeid = true line should be indented with a tab

  1. If you forgot to add the change id and already committed you can amend your last commit (by clicking the corresponding button: second to the left from the change id button) and then hit the change id button. To add change ids to several commits see the first SO link.
1mi
  • 121
  • 1
  • 4