git push错误ERROR: missing Change-Id in commit message footer

        完整的错误日志如下:

Total 11 (delta 6), reused 0 (delta 0)
remote: Resolving deltas: 100% (6/6)
remote: Processing changes: refs: 1, done    
remote: ERROR: missing Change-Id in commit message footer
remote: Suggestion for commit message:
remote: Add reverse interface in reverse service.
remote: 
remote: DONE=#88694
remote: 
remote: Change-Id: I90ddd8d136212efa6b6cafcc0c6cd971c3113b7f
remote: 
remote: Hint: To automatically insert Change-Id, install the hook:
remote:   gitdir=$(git rev-parse --git-dir); scp -p -P 29418 [email protected]:hooks/commit-msg ${gitdir}/hooks/
remote: 
remote: 
To ssh://[email protected]:29418/projects/QingGan_OS/framework/base/services/SystemPolicy.git
 ! [remote rejected] HEAD -> refs/for/master (missing Change-Id in commit message footer)
error: failed to push some refs to 'ssh://[email protected]:29418/projects/QingGan_OS/framework/base/services/SystemPolicy.git'
错误提示,可以看出Change-Id丢失,导致该错误的原因不清楚。

解决问题步骤如下

1、按照Hint提示,执行命令:

gitdir=$(git rev-parse --git-dir); scp -p -P 29418 [email protected]:hooks/commit-msg ${gitdir}/hooks/
2、然后重新添加commit,执行命令:

git commit --amend
3、最后重新push,解决问题


你可能感兴趣的:(开发工具)