git 提交 出现 ERROR: missing Change-Id
1 用git 提交代码出现 missing change—id
remote: Processing changes: refs: 1, done
remote: ERROR: missing Change-Id in commit message footer
remote: Suggestion for commit message:
remote: ttt
remote:
remote: Change-Id: Ifbea87a6358d55a189528a5f501492c37bdfec21
remote:
remote: Hint: To automatically insert Change-Id, install the hook:
remote: gitdir=$(git rev-parse --git-dir); scp -p -P 29418 HostName@192.168.16.157:hooks/commit-msg ${gitdir}/hooks/
remote:
remote:
To ssh://HostName@192.168.77.11:29418/test/test0
! [remote rejected] HEAD -> refs/for/master (missing Change-Id in commit message footer)
2 可以按照git 的提示操作
用 gitdir=$(git rev-parse --git-dir); scp -p -P 29418 HostName@192.168.16.157:hooks/commit-msg ${gitdir}/hooks/
之后用
git commit --amend
3 重新提交即可