Git Unable to resolve brute force conflicts as mergetool does not appear

I am rebasing on my current branch "MyUseCaseTest" with the master branch.

I am getting merge conflicts which I am trying to accomplish using my configured mergetool which is vsdiffmerge. Here is the .gitconfig file

[diff]
    tool = vsdiffmerge
[difftool]
      prompt = false
[difftool "vsdiffmerge"]
      cmd = '"%VSINSTALLDIR%Common7/IDE/vsdiffmerge.exe"' "$LOCAL" "$REMOTE" //t
      keepbackup = false
      trustexitcode = true
[merge]
      tool = vsdiffmerge
[mergetool]
      prompt = false
[mergetool "vsdiffmerge"]
      cmd = '"%VSINSTALLDIR%Common7/IDE/vsdiffmerge.exe"' "$REMOTE" "$LOCAL" "$BASE" "$MERGED" //m
      keepbackup = false
      trustexitcode = true

      

Here are the commands I tried to pull out the vsdiffmerge popup tool,

git mergetool
git mergetool -t vsdiffmerge

      

but they don't use this error instead

$ git mergetool -t vsdiffmerge
Merging:
src/OneDirection.cs
src/CustomBatch.cs

Normal merge conflict for 'src/OneDirection.cs':   
{local}: modified file   
{remote}: modified file 
/libexec/git-core/git-mergetool--lib: line 136: fg: no job control 
merge of src/OneDirection.cs failed 
Continue merging other unresolved paths (y/n) ?

      

I click yes and I get the same error but for a different file. I don't know what is wrong and how to fix it. The guides do not explain this scenario. I couldn't find anything that explains what is going on or how to fix it.

Please, help.

+3


source to share


2 answers


I had a similar problem and orad's answer pointed me in the right direction - the path was the problem (I'm still not used to linux-style stylesheets ...) and as a result I worked on it:

[diff]
    tool = vsdiffmerge
[difftool]
  prompt = false
[difftool "vsdiffmerge"]
    cmd = \"C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/vsdiffmerge.exe\" "$LOCAL" "$REMOTE" //t
    keepbackup = false
    trustexitcode = true
[merge]
    tool = vsdiffmerge
[mergetool]
    prompt = false
[mergetool "vsdiffmerge"]
    cmd = \"C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/vsdiffmerge.exe\" "$REMOTE" "$LOCAL" "$BASE" "$MERGED" //m
    keepbackup = false
    trustexitcode = true

      



Although it would be very helpful to use% VSINSTALLDIR% to avoid absolute file paths. Thanks to Mark Kadlec for displaying the correct syntax.

0


source


Once you get a conflict, you can simply open that file and search for HEAD to see where the conflict is and manually resolve it.



-2


source







All Articles