How do I resolve conflicts with Git?

前端 未结 3 950
名媛妹妹
名媛妹妹 2020-12-30 09:52

I have a pull request for which GitHub tells me \"This branch has conflicts that must be resolved.\" I tried:

~/src/networkx: git rebase origin/master
Curren         


        
3条回答
  •  无人及你
    2020-12-30 10:19

    Try running this to see what remotes you have set up:

    git remote -v
    

    If you don't already have a remote for the original repository you forked from in Github, you can add it as follows:

    git remote add upstream https://github.com/networkx/networkx.git
    

    This will name the remote upstream. After this, you can merge in the latest upstream into your branch and resolve your conflicts:

    git fetch upstream
    git merge upstream/master
    

    If the first git remote -v command already showed a remote with that name, just use that instead of adding a new remote. Hope that helps.

提交回复
热议问题