What are the differences between git cherry-pick and git show | patch -p1?

后端 未结 2 2122
渐次进展
渐次进展 2021-02-13 21:29

I ran into a situation where git cherry-pick X would have some conflicts, but also created extra inserts (when verified with git diff).

I then

2条回答
  •  庸人自扰
    2021-02-13 21:58

    This might help:

    http://technosophos.com/2009/12/04/git-cherry-picking-move-small-code-patches-across-branches.html

    It might be partly off topic, but as you can see, cherry picking seems to track code blocks across the code in some way, much more advanced than what I would guess patch does, which is probably just parsing the two codebases sequentially and side by side, and mark lines that differ.

提交回复
热议问题