Search code examples
gitgerrit

Gerrit Change-Id Present But Still Get Error


I try and publish a change to Gerrit but get ERROR: [65de9f6] missing Change-Id in commit message footer

I look at git log and see the change-ID; same if I do a git commit --amend

(commit message)

Change-Id: I1e6716a5ec101840653802928ec972c6a0e19808

I also have commit-msg present at {my_repo}.git\hooks\commit-msg

What am I doing wrong?


Solution

  • Gerrit is notifying that commit 65de9f6 is missing the Change-Id. Probably this is not your commit but some parent instead.

    First of all, check the commit number of your change, after that search for the commit 65de9f6 in the commit tree.

    If it is a parent of your commit then you need to understand why you're pushing this commit together with your commit (each new commit generates different new changes in Gerrit).

    If it's OK to send these two commits to Gerrit then you need to add the Change-Id to 65de9f6 commit. If there's something wrong then you need to remove the extra commit from your tree. In both cases, you need to use the "git rebase -i" command.