我是Gerrit的新手,想在提交新更改时创建一个新的补丁。我使用了这个指南来设置Gerrit:https://review.typo3.org/Documentation/install-quick.html
然后我尝试使用http://gerrit.googlecode.com/svn/documentation/2.0/user-changeid.html来创建一个新的补丁,并在提交信息的底部添加了Change-Id
行。
但我得到的是新的变更,而不是新的补丁集。有人能帮我吗?
谢谢
我是Gerrit的新手,想在提交新更改时创建一个新的补丁。我使用了这个指南来设置Gerrit:https://review.typo3.org/Documentation/install-quick.html
然后我尝试使用http://gerrit.googlecode.com/svn/documentation/2.0/user-changeid.html来创建一个新的补丁,并在提交信息的底部添加了Change-Id
行。
但我得到的是新的变更,而不是新的补丁集。有人能帮我吗?
谢谢
步骤1:为Gerrit安装commit-msg钩子
scp -p -P 29418 <gerrit_url>:hooks/commit-msg .git/hooks/
第二步: 创建常规提交并推送(对于Patchset1)
例如:
git add Server.java
git commit -m "server added"
git push origin HEAD:refs/for/master
步骤3: 在对Server.java做了一些更改后
最后创建新的Patchset (Patchset 2)
git add Server.java
git commit --amend
git push origin HEAD:refs/for/master
为其他补丁重复第3步
git-commit --amend
命令,并将 Change-Id 行保持不变。change ID : [change ID ]
refs/for/master
。这不是一个需要你自己去找出远程分支名称的占位符 - 实际上它就是 gerrit 期望的远程分支名称。 - Hamycommit-msg
钩子吗?这样做,推送到Gerrit的初始提交将没有change-id。 - larsks