No announcement yet.

Configuring as the diff tool in vscode & git

  • Filter
  • Time
  • Show
Clear All
new posts

  • Configuring as the diff tool in vscode & git

    The only mention I see here of vscode is a few years old and things move quickly, so I wanted to see what the recommended way of doing the following is:

    I'm on a mac and using vscode with the gitlens plugin. When I right-click "changes" in the "source control" pane I get the option "open directory compare (difftool)". When I click it I get the error:

    Error: No diff tool found

    I'd like it to open Beyond Compare.

    Is there a recommended way to configure that?

  • #2
    Gitlens looks like it's written by GitKraken, which is likely using your current .gitconfig.

    If you use Git Bash from the command line, is it configured to launch a file diff? And a directory diff if you use git difftool --dir-diff ?
    Does the plug-in then work after this is configured?

    I'm not as familiar with the plug-in vs. Code's default Git interface, but I can launch the difftool commands from Code and get BC4 to launch, though I see three different, similarly worded entries under Changes -> Open Changes: "Open All Changes (difftool)", "Open directory compare (difftool)", and "Open directory compare with (difftool)"

    The first one opens 3 tabs, one for each file, while the directory compare options open the Folder Compare view.
    Aaron P Scooter Software


    • #3
      Thanks! I got it working. For anyone else, here's what I did:

      1) In BeyondCompare, menu "Beyond Compare" => "Install command line tools"
      2) In terminal: `git config --global diff.tool bc`
      3) In BeyondCompare, menu "Session" => "Session Settings" => "Handling" : check "Follow symbolic links" and change "use for this view only" to "also update session defaults", then click "ok".

      Then in vscode, in the source control pane, right-click the word "Changes" and choose "Open Changes" => "Open Directory Compare"