0

I use egit to commit my files in eclipse to the gerrit server. I've added the change-Id using egit "Add change Id" button in the git staging view. Nevertheless I still have the error message "missing subject; Change-Id must be in commit message footer" while pushing!

Here is what my commit message looks like in egit using the Amend last commit message button :

CVS et load de config

Signed-off-by: xxx

Change-Id: Idda4d4ab44d0fa825755415f91b2b706b403b0e8

I try to push using git bash and get the same error message even after the command

scp -p -P 29418 dxxx@myhost.fr:hooks/commit-msg .git/hooks/

jayjaypg22
  • 1,641
  • 5
  • 22
  • 41
  • So that we are all clear, you experienced this error when trying to _amend_ a commit? – Tim Biegeleisen Jun 09 '16 at 10:37
  • 1
    Have a look at the `git log`. There seem commits that still lack the `Change-Id:` line. – StephenKing Jun 09 '16 at 10:42
  • @TimBiegeleisen : no it's while pushing the files commited. – jayjaypg22 Jun 09 '16 at 12:55
  • @StephenKing : indeed I've done a revert on several of them but I still have the same error. Is there a way to know which commit is wrong? I'm working on windows, the tools I used aren't easy : egit and Git Bash. – jayjaypg22 Jun 09 '16 at 13:00
  • Is revert the right action to do on the wrong commit? – jayjaypg22 Jun 09 '16 at 13:02
  • 1
    No, you have to rewrite history. Reverts don't remove the old commits, but you try to push them. See [this question](http://stackoverflow.com/questions/8845658/gerrit-error-when-change-id-in-commit-messages-are-missing). – StephenKing Jun 09 '16 at 13:03
  • 1
    When you amend a commit, you rewrite it. Perhaps the commit message somehow ended up in a state which could cause this problem. – Tim Biegeleisen Jun 09 '16 at 13:04

0 Answers0