Evil merges in git - where do they come from?

后端 未结 3 1886
隐瞒了意图╮
隐瞒了意图╮ 2021-01-06 03:34

I\'ve read this question and the answers, but what isn\'t clear to me is WHO creates the \"changes that do not appear in any parent\".

Is it the git merge algorithm

3条回答
  •  抹茶落季
    2021-01-06 04:22

    It is explained in the first comment of the correct answer. You merge without doing a commit (either through conflict or --no-commit) and then add additional changes to the merge before committing.

    Note, resolving a merge conflict is not evil, you simply pick code which exists in one or both sides of the conflict. If you add some code which does not exist in either side, you have now turned the merge evil.

提交回复
热议问题