Jarrett Jarrett - 21 days ago 7
Git Question

Custom change-id in gerrit

Is it possible to have a 'custom' change-id in a gerrit commit message?

For example,

- My commit message

Change-Id: BM10945


Where
BM10945
is the bluemine ticket the change is for.

I keep getting a
(missing or invalid Change-Id line format in commit message footer)
from gerrit, and can't commit.

Answer

No, you can't. You need to use Gerrit's own Change-Id format. You can have one autogenerated for your commit by installing the commit-msg hook script included with Gerrit. More information is available at the Gerrit Change-Ids documentation.