当我做git cherry-pick
时并且存在冲突,git 停止提交并允许我解决冲突。
即使没有冲突,有没有办法强制停止?
我想要这样做的原因是我有一个更改想要挑选,但我不想要它更改的所有文件。在提交之前让它停止允许我从提交中删除文件,然后执行 git cherry-pick --continue
没有它
git cherry-pick --no-commit
做的事情与我想要的类似,但不完全一样。
如果你这样做git cherry-pick --no-commit
然后git commit
结果与您这样做时得到的结果不同 git cherry-pick
,解决冲突,然后执行 git cherry-pick --continue
最佳答案
也许您正在搜索gitcherry-pick --no-commit
-n --no-commit
Usually the command automatically creates a sequence of commits. This flag applies the changes necessary to cherry-pick each named commit to your working tree and the index, without making any commit. In addition, when this option is used, your index does not have to match the HEAD commit. The cherry-pick is done against the beginning state of your index.
This is useful when cherry-picking more than one commits' effect to your index in a row.
来自here .
关于git - 强制部分 git 挑选?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57903463/