Why does this cherry-pick have a conflict?

后端 未结 2 1537
孤街浪徒
孤街浪徒 2020-12-05 11:02

I know git cherry-pick is a command that use to apply the changes of specified commit, but I think I just don\'t really understand the way it works.

Let

2条回答
  •  时光取名叫无心
    2020-12-05 11:28

    Technically, since you are editing the same line of the same file on different branches, Git sees this as a conflict. Cherrypicking, while not technically a 'merge' operation, still looks for the same types of conflict and asks you to resolve them.

    For conflicting paths, the index file records up to three versions, as described in the "TRUE MERGE" section of git-merge[1]. The working tree files will include a description of the conflict bracketed by the usual conflict markers <<<<<<< and >>>>>>>.

    From git-scm documentation

提交回复
热议问题