'git pull' brings others' commits into my staging area during merge conflict

前端 未结 2 708
[愿得一人]
[愿得一人] 2020-12-30 11:41

So, I have faced this nasty problem quite often, and tried looking for any solutions online, but I am not sure if this is git\'s expected behavior or not.

Whenever I

2条回答
  •  庸人自扰
    2020-12-30 12:20

    The default behaviour of git pull is to perform a fetch and then a merge. A merge is an actual, new, commit; normally this is resolved automatically so you see no staged changes. However, in the case of a conflict, the commit cannot be performed automatically, hence the visible staged changes.

提交回复
热议问题