Visual Studio 2013不提供在Git pull上进行合并 [英] Visual Studio 2013 does not offer to do merge on Git pull

查看:1009
本文介绍了Visual Studio 2013不提供在Git pull上进行合并的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2013 Update 4和git(托管在Visual Studio Online上)。我在远程分支中有2个本地提交和2个提交。有没有本地更改提交:





当我尝试在Visual Studio中执行Pull(或Fetch)时,出现错误:


发生错误。详细信息:1冲突阻止结帐




是的,存在冲突,我应该合并。并根据转到此页面,我应该提供一个链接来解决冲突。但是我在VS中看不到。



我可以在VS之外合并,但这不是重点。同时,运行相同设置的同事可以在没有问题的情况下进行合并。 我的VS有什么问题?



p.s。我安装了msysgit,可能会与配置混淆。根据这个 post my global .gitconfig 看起来像:

  [user] 
mail = trailmax@stackoverflow.com
name = trailmax
email = trailmax@stackoverflow.com
[core]
excludesfile = C:\\ Users \\trailmax \\ Documents \\ gitignore_global.txt
autocrlf = true
editor = \C:/ Program Files (x86)/GitExtensions/GitExtensions.exe\fileeditor
[diff]
tool = vsdiffmerge
[difftoolvsdiffmerge]
cmd = \C:\ \程序文件(x86)\\\ Microsoft Visual Studio 12.0 \\\\\\\\\\\\\\\\\\\\\\\\\ // t
keepbackup = false
trustexistcode = true
[合并]
工具= vsdiffmerge
[mergetool]
prompt = true
[mergetoolvsdiffmerge]
cmd = \C:\\程序文件(x86)\\Microsoft Visual Studio 12.0 \\\ Common \\\ \IDE \\\\vsdiffmerge.exe\\$ REMOTE \\ MERGED \// m
keepbackup = false
trustexistcode = true
[凭证]


解决方案

在我的情况下,我看不到 解决冲突 选项,因为我还没有提交 本地更改 ,我试图与远程更改同步。只要我提交 本地更改 ,然后再次尝试同步,解决冲突链接出现。 p>

所以这里的要点是:首先提交您的更改,然后尝试同步。合并将开始,Visual Studio将允许您浏览每个冲突


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 commit:

When I try to do Pull (or Fetch) in Visual Studio, I get error:

An error occurred. Detailed message: 1 conflict prevents checkout

Yes, there is a conflict, I should do merge. And according to this page I should be offered a link to resolve conflict. But I don't see that in VS.

I can do merge outside of VS, but that's not the point. At the same time, my workmate running the same set up can do the merge with no issues. What is wrong with my VS?

p.s. I have msysgit installed that might have messed with configurations. According to this post my global .gitconfig looks like:

[user]
    mail = trailmax@stackoverflow.com
    name = trailmax
    email = trailmax@stackoverflow.com
[core]
    excludesfile = C:\\Users\\trailmax\\Documents\\gitignore_global.txt
    autocrlf = true
    editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor
[diff]
    tool = vsdiffmerge    
[difftool "vsdiffmerge"]
    cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$LOCAL\" \"$REMOTE\" //t
    keepbackup = false
    trustexistcode = true
[merge]
    tool = vsdiffmerge
[mergetool]
    prompt = true
[mergetool "vsdiffmerge"]
    cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\" //m
    keepbackup = false
    trustexistcode = true
[credential]

解决方案

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.

这篇关于Visual Studio 2013不提供在Git pull上进行合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆