Announcement

Collapse
No announcement yet.

git difftool does not work

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • git difftool does not work

    I entered these two commands in the git bash:
    Code:
    git config --global diff.tool bc3
    git config --global difftool.bc3.path "c:/Program Files (x86)/Beyond Compare 4/bcomp.exe"
    When I enter "git difftool", beyond compare with empty panels opens.

  • #2
    your passing it no variables. try modifying the command line using the following information:

    When git difftool is invoked with this tool (either through the -t or --tool option or the diff.tool configuration variable) the configured command line will be invoked with the following variables available: $LOCAL is set to the name of the temporary file containing the contents of the diff pre-image and $REMOTE is set to the name of the temporary file containing the contents of the diff post-image. $MERGED is the name of the file which is being compared. $BASE is provided for compatibility with custom merge tool commands and has the same value as $MERGED.


    You may need to call a script and have the script launch bc picking up the environment variables.

    Comment


    • #3
      The config looks correct, following our recommended setup here:
      http://www.scootersoftware.com/suppo...vcs#gitwindows

      Which version of Git are you running?
      If you call git diff, does the built-in tool report and show the file differences?

      Update: Verified with Git 2.8.3
      Last edited by Aaron; 06-Jun-2016, 12:44 PM. Reason: Update: Tested Git 2.8.3
      Aaron P Scooter Software

      Comment


      • #4
        I am having a similar issue , and I am running 2.9.3.windows.1 on a Win 7 Enterprise machine.
        my gitconfig:
        [diff]
        tool = bc
        [difftool "bc"]
        path = c:/Program Files (x86)/Beyond Compare 3/bcomp.exe
        [difftool]
        prompt = false
        [merge]
        tool = bc
        [mergetool]
        prompt = false
        keepBackup = false
        [mergetool "bc"]
        trustExitCode = true
        path = c:/Program Files (x86)/Beyond Compare 3/bcomp.exe

        When I enter "git difftool foo.txt" nothing happens. No panel is opened. Can anyone help me here?

        Thanks

        Comment


        • #5
          Hello,

          And if you use the "bc3" configuration instructions, does this help:
          http://www.scootersoftware.com/suppo...vcs#gitwindows

          This method uses "bc3" since Git has built-in support for detecting BC3 if you use the "bc3" keyword.

          Also, you will need quotes around your path = "variables"
          Aaron P Scooter Software

          Comment

          Working...
          X