我在 git review
上得到以下内容:
git review
You are about to submit multiple commits. This is expected if you are
submitting a commit that is dependent on one or more in-review
commits. Otherwise you should consider squashing your changes into one
commit before submitting.
The outstanding commits are:
2de3eef (HEAD -> AddingReleaseIndex) Adding index page for subrelease projects
d3dbc89 (Addingindex) Add index with submodules
Do you really want to submit the above commits?
Type 'yes' to confirm, other to cancel: no
Aborting.
我有很多分支,每个分支都有一个正在实现的特定功能。我只想发送 HEAD (2de3eef) 上的提交以供审核,仅此而已。
我找到了一个 article它说我可以使用 git cherry-pick 将选定的提交移动到另一个分支并将其发送给另一个分支以供审查。我不想通过另一个分支发送它以供审查,我想通过同一个分支发送它,因为它是关于特定功能的。
我该如何解决这种情况?
最佳答案
看起来你有这样的东西:
.. ---A <= master
\
B <= feature1
\
C <= feature2
这样(基于提交 B 提交 C)如果您将提交 C 推送到 Gerrit,您也必然会推送提交 B。您需要按以下方式工作:
B <= feature1
/
.. ---A <= master
\
C <= feature2
提交 C 必须基于提交 A。feature1 和 feature2 分支必须并行工作。
关于Git 审查 : submit particular commit from multiple commits,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41453454/