Visual Studio 2013 does not offer to do merge on Git pull

后端 未结 5 585
醉话见心
醉话见心 2020-12-28 13:52

I\'m working with Visual Studio 2013 Update 4 and git (hosted on Visual Studio Online). I have 2 local commits and 2 commits in remote branch. There are NO local changes to

相关标签:
5条回答
  • 2020-12-28 14:31

    If the conflicts during the pull are about end of line charaters:

    git config --global core.autocrlf false
    

    That should avoid any automatic eol conversion.

    You can see more in "Why does git think each line of an untouched file has changed" how to detect that situation in the working tree (git diff --word-diff-regex=.).

    0 讨论(0)
  • 2020-12-28 14:37

    I have encountered the same issue where "An error occurred. Detailed message: 1 conflict prevents checkout" is shown where there's no option to resolve the conflict as shown in Leinel's answer.

    The reason was due to an untracked file that is the same file that is to be pulled. I just deleted the untracked file and retried the pull.

    0 讨论(0)
  • 2020-12-28 14:39

    In my case I could not see the Resolve the conflicts option because I had local changes not committed yet and I was trying to sync with the remote changes. As soon as I committed my local changes and then tried a sync again, Resolve the conflicts link appeared.

    So the point here is: commit your changes first and then try to sync. A merge will start and Visual Studio will allow you to go through each of the conflicts.

    enter image description here

    0 讨论(0)
  • 2020-12-28 14:48

    I had the same issue. It turns out that I had an untracked file that needed to be included. Therefore, check in Changes tab for untracked files.

    0 讨论(0)
  • 2020-12-28 14:54

    I did not have any "Changes" (untracked or otherwise) listed on either branch, so the other answers did not work for me.

    I decided to go command line:

    1. Click Sync on both branches.
    2. Switch to the branch you want to "merge into" (master in my case).
    3. In Team Explorer under Manage Branches, do Action -> Open Command Line.
    4. In the command line type git merge BRANCH_NAME. (my work branch / merge "from")
    5. Now the Resolve the conflicts button is available.
    0 讨论(0)
提交回复
热议问题