Today, my first day of contributing code to another new project.
I failed to push commits to Gerrit with the error ‘ERROR: missing Change-Id in commit message footer’.
After googled, I found my answer already offered by Gerrit that is the Gerrit has been configured always requiring a Change-Id in the commit message.
And the simple way to fix this is to install a hook to automatically insert Change-Id on each commit.
either way below could obtain the hook from Gerrit for you:
$ scp -p -P 29418 <your username>@<your Gerrit review server>:hooks/commit-msg <local path to your git>/.git/hooks/
$ curl -Lo <local path to your git>/.git/hooks/commit-msg <your Gerrit http URL>/tools/hooks/commit-msg
More info please trace: https://gerrit-review.googlesource.com/Documentation/cmd-hook-commit-msg.html
本文介绍了在使用Gerrit进行代码提交时遇到的错误‘ERROR: missing Change-Id in commit message footer’及其解决方法。作者在初次为新项目贡献代码时遇到了此问题,并通过查询找到了解决方案:安装一个可以自动在每次提交时插入Change-Id的钩子。
945

被折叠的 条评论
为什么被折叠?



