我已经问了一个问题,但我还没有找到合适的答案。
How to a huge code to small patches in Gerrit
例如,我的代码有几个python文件:p1.py,p2.py,...,p5.py。
现在我想将(p1.py和p2.py)分组到另一个补丁集中的一个补丁集和组(p3.py.p4.py和p5.py)中。但条件是2组应该是相同的分支名称。这是一个例子:
An example shows different patchsets with the same branch name
请让我知道如何做到这一点。
答案 0 :(得分:1)
First you have to make git add p1.py
and git add p2.py
then git commit -m "<message>"
and push it to your branch and you will have Change-Id. After push add the other files (p3.py, p4.py, p5.py), edit commit message with git commit --amend
command. Now you can make git push
and you will have new patch set. Change Id will remain in the commit message. But in case you want to be sure, use amend with --no-edit
to disable modifying the commit message.