如何在Gerrit中创建新的补丁集? [英] How to create a new Patchset in Gerrit?

查看:190
本文介绍了如何在Gerrit中创建新的补丁集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不熟悉Gerrit,并且想在提交新更改时创建一个新补丁.我使用此指南 https://review.typo3.org/Documentation/install-设置Gerrit quick.html

I am new to Gerrit and want to create a new Patch when new changes are submitted. I setup Gerrit with this guide https://review.typo3.org/Documentation/install-quick.html

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

Then I try to create a new patch with http://gerrit.googlecode.com/svn/documentation/2.0/user-changeid.html and also added Change-Id line at bottom of the Commit-message.

但是我得到了新的Change而不是新的补丁集.谁能帮我吗?

But I am getting new Change instead of new Patchset. Can anyone help me?

谢谢

推荐答案

步骤1 :安装Gerrit的commit-msg钩子

Step 1: Install commit-msg hooks for gerrit

scp -p -P 29418 localhost:hooks/commit-msg .git/hooks/

第2步:创建普通的提交并推送(对于Patchset1)

Step 2: Create normal commit and push (for Patchset1)

例如:

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

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

Step 3: After doing some changes to Server.java

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

Finally to create new Patchset (Patchset 2)

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

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

Repeat step 3 for further Patches

这篇关于如何在Gerrit中创建新的补丁集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆