Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2014
    Posts
    2

    Default Git error when trying to diff with Beyond Compare 4

    Hi Mr. or Mrs,

    Today, I install the Beyond compare tool for windows, and I follow the installation notes for Git (My Git version is: 1.9.4)
    When I am trying to do a “git difftool file” command it gives me the following error message:

    c:\Users\<<UserName>>\AppData\Local\GitHub\Portabl eGit_7eaa994416ae7b397b2628033ac45f8ff6ac2010\libe xec\git-core\mergetools\bc3 line 121 c:/program files (x86)/beyond compare 3/bcomp.exe: No such file or directory

    The contents of the above file looks like this:

    diff_cmd () {
    "$merge_tool_path" "$LOCAL" "$REMOTE"
    }

    merge_cmd () {
    touch "$BACKUP"
    if $base_present
    then
    "$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" \
    -mergeoutput="$MERGED"
    else
    "$merge_tool_path" "$LOCAL" "$REMOTE" \
    -mergeoutput="$MERGED"
    fi
    check_unchanged
    }

    translate_merge_tool_path() {
    if type bcomp >/dev/null 2>/dev/null
    then
    echo bcomp
    else
    echo bcompare
    fi
    }


    My .gitConfig file looks like this:

    [diff]
    tool = bc3
    [difftool "bc3"]
    path = c:/Program Files (x86)/Beyond Compare 4/bcomp.exe
    [merge]
    tool = bc3
    [mergetool "bc3"]
    path = c:/Program Files (x86)/Beyond Compare 4/bcomp.exe

    Can I get the beyond compare tool to do a diff with Git?

    Thank you,
    E.

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,384

    Default

    Hello,

    Git changes how it handles the configuration pretty wildly between its versions. I verified our directions do work on the latest Git for Windows release 2.1.2. Is updating to a newer version of Git an option?
    http://www.scootersoftware.com/suppo...vcs#gitwindows
    Aaron P Scooter Software

  3. #3
    Join Date
    Oct 2014
    Posts
    2

    Default

    I have installed github for windows, but I mainly use the command line. Github for windows installs Git Shell. This is what I mainly use, and its version is a par with the latest git shell 1.9.4
    My GitHub for Windows version is 2.4.1.2

    Thanks,
    E.

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,584

    Default

    The Git for Windows instructions that Aaron linked to earlier work with the current version of Git for Windows, which displays the version as 1.9.4.msysgit.2 when you run "git --version" at the command line.

    The version of Git bundled with GitHub for Windows uses a different configuration than Git for Windows, so the instructions on our page will not work with it. I'm researching configuration instructions for GitHub for Windows. I'll make a followup post if I find a solution.
    Chris K Scooter Software

  5. #5
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,584

    Default

    Here are terminal commands to configure Beyond Compare 4 Pro for Windows as the diff and merge tool for GitHub 2.4.1.2 for Windows:

    Diff:
    git config --global diff.tool bc4
    git config --global difftool.bc4.cmd "\"c:/program files (x86)/beyond compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\""


    Merge:
    git config --global merge.tool bc4
    git config --global mergetool.bc4.cmd "\"c:/program files (x86)/beyond compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\""
    git config --global mergetool.bc4.trustExitCode true


    To launch a diff in Beyond Compare use the command:
    git difftool file.ext

    To launch a merge in Beyond Compare, use the command:
    git mergetool file.ext
    Chris K Scooter Software

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,584

    Default

    The Git for Windows instructions on our website are updated with instructions valid for both Git for Windows from the official Git website and the version of Git included with GitHub for Windows.

    Beyond Compare as Diff and Merge tool in Git for Windows:
    http://www.scootersoftware.com/suppo...vcs#gitwindows
    Chris K Scooter Software

  7. #7
    Join Date
    May 2015
    Posts
    3

    Default

    Quote Originally Posted by Chris View Post
    The Git for Windows instructions on our website are updated with instructions valid for both Git for Windows from the official Git website and the version of Git included with GitHub for Windows.

    Beyond Compare as Diff and Merge tool in Git for Windows:
    http://www.scootersoftware.com/suppo...vcs#gitwindows
    These settings are not working for me. When I run the mergetool it doesn't load any files into the app for merging.

  8. #8
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,384

    Default

    Hello,

    Which version of Git are you running, on which OS?

    If you follow the instructions for "bc3", including using "bc3" text, but give the path to Beyond Compare 4, does this work for you?
    Aaron P Scooter Software

  9. #9
    Join Date
    May 2015
    Posts
    3

    Default

    Hi Aaron,

    git version 1.9.4.msysgit.2
    Windows 8.1 Enterprise

    I'll try out the bc3 instructions. I think I tried these, but will verify with the "bc3" text instructions as you suggested.

    Thanks,
    Jeff

    Quote Originally Posted by Aaron View Post
    Hello,

    Which version of Git are you running, on which OS?

    If you follow the instructions for "bc3", including using "bc3" text, but give the path to Beyond Compare 4, does this work for you?

  10. #10
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,384

    Default

    Thanks. "bc3" is a keyword that Git recognizes and then can properly call bcomp.exe as a difftool. It does not appear that "bc4" support has been added, but since we haven't changed our command line from BC3 to BC4, I found this worked for the latest release.
    Aaron P Scooter Software

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •