我刚刚安装了Gerrit,我想对它进行推送,但是我收到了有关Change-Id
的错误,但它似乎存在于它抱怨的提交中。将Change-Id添加到所有提交
$ git push gerrit HEAD:refs/publish/my-branch
Counting objects: 28, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (15/15), done.
Writing objects: 100% (15/15), 4.46 KiB, done.
Total 15 (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: Revert "Refactoring controllers"
remote:
remote: This reverts commit dd1c5c86b12461f61326fd102a11d9e3cb51142e.
remote:
remote: Change-Id: Iaacf80a9e4f56b58d0b648112c3eb2413988f00e
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/Project
! [remote rejected] HEAD -> refs/publish/my-branch (missing Change-Id in commit message footer)
error: failed to push some refs to 'ssh://[email protected]:29418/Project'
我认为,这是因为以前的提交是没有Change-Id
,因为他们之前有钩制成。我如何更新所有以前的提交以添加Change-Id
?
导入存储库时,通常会推送给主服务器,而不是推送审阅。 – uncletall