完整的错误日志如下: [java] view plain copy <span style="font-size:14px;">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 harryhe@10.10.96.212:hooks/commit-msg ${gitdir}/hooks/ remote: remote: To ssh://harryhe@10.10.96.212: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://harryhe@10.10.96.212:29418/projects/QingGan_OS/framework/base/services/SystemPolicy.git' </span> 错误提示,可以看出Change-Id丢失,导致该错误的原因不清楚。 解决问题步骤如下: 1、按照Hint提示,执行命令: [java] view plain copy gitdir=$(git rev-parse --git-dir); scp -p -P 29418 harryhe@10.10.96.212:hooks/commit-msg ${gitdir}/hooks/ 2、然后重新添加commit,执行命令: [java] view plain copy git commit --amend 3、最后重新push,解决问题