如何在 Gerrit 中创建新的补丁集?

2024-01-09

我是 Gerrit 新手,希望在提交新更改时创建新补丁。我使用本指南设置 Gerrithttps://review.typo3.org/Documentation/install-quick.html https://review.typo3.org/Documentation/install-quick.html

然后我尝试创建一个新补丁http://gerrit.googlecode.com/svn/documentation/2.0/user-changeid.html http://gerrit.googlecode.com/svn/documentation/2.0/user-changeid.html并且还添加了Change-Id提交消息底部的行。

但我得到的是新的更改而不是新的补丁集。谁能帮我?

Thanks


Step 1:为 gerrit 安装 commit-msg 钩子

scp -p -P 29418 <gerrit_url>:hooks/commit-msg .git/hooks/

Step 2:创建正常提交并推送(针对 Patchset1)

例如:

git add Server.java
git commit -m "server added"
git push origin HEAD:refs/for/master

Step 3:对 Server.java 进行一些更改后

最后创建新的补丁集(补丁集2)

git add Server.java
git commit --amend
git push origin HEAD:refs/for/master

重复步骤 3 以获取更多补丁

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在 Gerrit 中创建新的补丁集? 的相关文章

随机推荐