If you get the "ERROR: missing Change-Id in commit message footer" message when submitting into your git repository that is using gerrit for code reviews, here is the quick solution to resolve this.
******************************************************************************************************
devel@ubuntu:~/arpita/automation_repo/automation$ git-submit
Counting objects: 108, done
Delta compression using up to 4 threads.
Compressing objects: 100% (75/75), done.
Writing objects: 100% (100/100), 95.98 KiB | 0 bytes/s, done.
Total 100 (delta 12), reused 0 (delta 0)
remote: Resolving deltas: 100% (12/12)
remote: Processing changes: refs: 1, done
remote: ERROR: missing Change-Id in commit message footer
remote: Suggestion for commit message:
remote: Merge branch 'master' of ssh://intouch3-gerrit.int.domain.com:29418/repo-automation
remote:
remote: Change-Id: I4ebe05b43e78d0c91a5f0de51e0b8ebc940309e4
remote:
remote: Hint: To automatically insert Change-Id, install the hook:
remote: gitdir=$(git rev-parse --git-dir); scp -p -P 29418 arpita.pathak@intouch3-gerrit.int.domain.com:hooks/commit-msg ${gitdir}/hooks/
remote:
remote:
To ssh://arpita.pathak@repo-gerrit.int.domain.com:29418/repo-automation
! [remote rejected] HEAD -> refs/for/master (missing Change-Id in commit message footer)
error: failed to push some refs to 'ssh://arpita.pathak@repo-gerrit.int.domain.com:29418/repo-automation'
********************************************************************************************************
Solution :
*********************************************************************************************************
devel@ubuntu:~/arpita/automation_repo/automation$ git rebase -i
Successfully rebased and updated refs/heads/master.
*********************************************************************************************************
The command opens up a file that allows you to "pick" the commit you want from a list. The others are abandoned. All the lines other than the relevant one should be deleted from this file and press <Ctrl+X> to continue.
*********************************************************************************************************
GNU nano 2.2.6 File: ...utomation/.git/rebase-merge/git-rebase-todo
pick 88e13ed All POC code from Impetus
# Rebase 3c2b37b..88e13ed onto 3c2b37b
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
***********************************************************************************************************
Executing a submit now, git push will now work as expected.