可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
We started to use the Gerrit code review recently. Sometimes when you make a simple commit and try to make a push to Gerrit, this error is displayed:
remote rejected commit subject >65 characters; use shorter first paragraph
I looked in the web but did not find how to solve this problem. I tried to make an amend in the previous commit and reduce the size of the commit message, but the error remains.
What kind of error is that? And how to solve it? Is there some Gerrit configuration about the size of the commit message?
回答1:
The first paragraph of your commit message should be 65 characters.
You may split it for a longer text:
initial commit message <65 chars my long commit message with a lot of information, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse metus nulla, blandit eget aliquam sed, tincidunt nec turpis. Ut quis gravida augue, scelerisque tempor risus...
回答2:
Check if you have installed commit-message-length-validator plugin. By default, commit message max subject length is 65, max line length is 70.
You could change the default setting on gerrit.config or you could remove/disable this plugin.