Git missing change ID in commit message footer solution
when git submits code to the server, the following error appears
missing change ID in commit message footer
cause: the commit MSG file is missing in the. Git/hooks directory of the project warehouse
solution 1: generally, when an error is reported in the submitted code, the corresponding solution prompt will be given
remote: Processing changes: refs: 1, done
remote: ERROR: missing Change-Id in commit message footer
remote:
remote: Hint: To automatically insert Change-Id, install the hook:
remote: gitdir=$(git rev-parse --git-dir); scp -p -P 29418 xxxxx@xxxx:hooks/commit-msg ${gitdir}/hooks/
remote: And then amend the commit:
remote: git commit --amend
as shown above, you can solve the problem by inputting the following commands under the project path in turn:
gitdir=$(git rev-parse --git-dir);
# Replace xxxxx@xxxx with the corresponding username and server (this command copies the commit-msg file from the server)
scp -p -P 29418 xxxxx@xxxx:hooks/commit-msg ${gitdir}/hooks/
# Commit again to generate change-id
git commit --amend
Solution 2: in fact, it is similar to the above method. If the current project has a backup, directly copy the. Git/hooks/commit MSG of the backup project to the corresponding directory of the current project
Similar Posts:
- remote: ERROR: [28b83b5] missing Change-Id in commit message footer
- Solve the GIT commit error and bypass the code check
- VSCode git commit Error: No such file or directory [How to Solve]
- Sourcetree / git solves the problem of pre commit hook failed
- [Solved] Git Error: pre -commit hook failed (add –no-verify to bypass)
- [Solved] Git review Error: Errors running git rebase -i remotes/gerrit/master
- [Solved] VS Code Error: Running the contributed command: ‘_workbench.downloadResource‘ failed
- [Cherry-pick Failed Error merging] You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists). Please, commit your changes before you merge.
- [Solved] React project NPM run error: npm ERR! errno 1