Gerrit,如何在以后的 cl 中反映对 base cl 的修改
Gerrit, How to have an amendment to base cl be reflected in later cl
我在 gerrit 中制作了三个彼此重叠的更改列表
CL1
cl2
cl3
所以当我查看 cl3 签出的 git 日志时(通过 git review -d 3),我看到了 CL1 和 CL2 的变化。
我被要求修改 CL1 并将一些更改移至 C2。修改 CL1 后,当我检查 cl2 或 3 时,我当然仍然会看到原始形式的 CL1 更改。我如何让 CL2 和 cl3 具有来自 CL1
的修改后的更改
您需要将 CL2 变基到 CL1'(新的 CL1 补丁集)才能创建 CL2',然后您需要将 CL3 变基到 CL2'才能创建 CL3'。像这样:
git checkout CL2
git rebase CL1'
Resolve conflicts
Change whatever you want
Add/Commit/Push
git checkout CL3
git rebase CL2'
Resolve conflicts
Change whatever you want
Add/Commit/Push
始终尝试处理您的提交 "in parallel" 因为这样您可以更改任何您想要的提交而不会影响其他提交。
我在 gerrit 中制作了三个彼此重叠的更改列表 CL1 cl2 cl3
所以当我查看 cl3 签出的 git 日志时(通过 git review -d 3),我看到了 CL1 和 CL2 的变化。
我被要求修改 CL1 并将一些更改移至 C2。修改 CL1 后,当我检查 cl2 或 3 时,我当然仍然会看到原始形式的 CL1 更改。我如何让 CL2 和 cl3 具有来自 CL1
的修改后的更改您需要将 CL2 变基到 CL1'(新的 CL1 补丁集)才能创建 CL2',然后您需要将 CL3 变基到 CL2'才能创建 CL3'。像这样:
git checkout CL2
git rebase CL1'
Resolve conflicts
Change whatever you want
Add/Commit/Push
git checkout CL3
git rebase CL2'
Resolve conflicts
Change whatever you want
Add/Commit/Push
始终尝试处理您的提交 "in parallel" 因为这样您可以更改任何您想要的提交而不会影响其他提交。