git conflict keep original upstream

This question already has an answer here:

  • Reset local repository branch to be just like remote repository HEAD 18 answers

  • Abort the conflicted merge:

    git merge --abort
    

    then set your local repo to the same commit as upstream, discarding local changes:

    git reset --hard upstream/master
    

    As for your question:

    why does GIT wants me to add a file I never made?

    It doesn't. It's telling you to resolve the conflicts in the files you changed, then git add <file> on those files, to mark the edited versions as resolved and OK to commit.

    链接地址: http://www.djcxy.com/p/26238.html

    上一篇: 如何在git中删除合并结果

    下一篇: git冲突保持原有的上游