No announcement yet.

Can't get git difftool to work right

  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't get git difftool to work right

    I'm using
    git version 2.17.2 (Apple Git-113)
    and BC4. When I configure it as per the FAQ,
    git difftool
    shows me the first file diff, but I can't get it to go to the next file. If I do the same thing I'd do with opendiff (ie. hit Cmd-Q), it closes the window but doesn't open another window with the next file diff.

    The FAQ says that for newer versions of Git, I should use
    git config --global diff.tool bc3
    but installing the command line tools never installed anything called bc3 so that doesn't work. So instead I'm editing `~/.gitconfig` as per the instructions for older versions of Git.

  • #2

    "bc3" is an older keyword that Git recognized and would correctly call to Beyond Compare, while "bc" is a newer keyword they've added. I'd suggest switching to "bc". Using custom keywords can also work, but then more manual configuration lines and information are needed, while git 'knows' what "bc" is and does some of the configuration for you automatically. This text isn't the command line itself, but a git variable name that is then used to identify the tool definition.

    Install Command Line Tools adds "bcompare" and "bcomp" to your command line. You can test this by executing the program by typing just that text in Terminal to verify it can launch BC4. Git then uses these commands for launching as a difftool.

    Could you include your current .gitconfig sections for diff and difftool? This way we can take a look at what you have. Also, please make sure to fully shutdown any open instances of git to make sure it isn't applying a cached version of the .gitconfig, then re-launch the Terminal/Git Bash/app to pull in the current .gitconfig changes. You can post here, or email at (along with a link referencing this forum thread).
    Aaron P Scooter Software


    • #3
      Same problem using "git config --global diff.tool bc" - it shows the diff on the first file using BC4, but then it doesn't go to the next file. That's the same result I get when I copy the config from for "older versions of git" - it shows the diffs in the first file, then when you cmd-Q it doesn't bring up the next files.


      • #4

        Could you post a complete version of the console log? When executing:
        git difftool
        it should prompt first for the first diff file that needs review with [Y/n], launch BC4, and then after closing BC4 the terminal continues to show a prompt for each next diff with another [Y/n] for each.

        I've retested with a default install of Git, and a blank gitconfig that only has added Name, Email, and ran:
        git config --global diff.tool bc
        Aaron P Scooter Software


        • #5
          I don't get prompted, it just goes into the first file. Then I hit cmd-Q and nothing happens, it's still in the git difftool command line.

          tomblin-mac:~/Developer/DQM_Platform/Development> git config --global diff.tool bc
          tomblin-mac:~/Developer/DQM_Platform/Development> git difftool HEAD^
          There is no console log to see.
          tomblin-mac:~/Developer/DQM_Platform/Development> cat ~/.gitconfig
              sslVslVerify = false                                                 
              name = Paul Tomblin                                               
              email =                                   
              longpaths = true                                                  
              preloadindex = true                                               
              fscache = true                                                    
              default = simple                                                  
              rebase = true
              auto = 256                                                        
              autosetuprebase = always                                          
              stat = true                                                       
              autoStash = true                                                  
              tool = bc
              prompt = false
              recentlySeenVersion =
              lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit


          • #6

            The issue is a combination of No Prompt and Quit Application (Apple+Q). Instead, if you Close Window (Apple+W) or close the tab, the task continues to call the additional diffs.

            If Prompts are enabled, then the Terminal responds after Quit and prompts for the next task.

            I'll open a tracker entry to investigate is this is git behavior we can work around.
            Aaron P Scooter Software


            • #7
              Ah, right you are! Thank you.