gitbeyondcomparedifftool

How to open git difftool for multiple files in a single Bcomp3 window?


When using git difftool --tool=bc3 from Git-Bash I got a BC3 window for each file. But to see the next window I had to close the previous one.

I wanted to see all diffed files at the same time as tabs in a single BC3 window.


Solution

  • I found the right hint on StackOverflow: #17736427.
    Using git difftool --dir-diff (having BC3 configured as difftool) is OK for me.
    Who wants to use this, may find the BC3 switch /expandall helpful.

    My previous solution was, to call git-difftool recursively.
    May be this trick is helpful for someone else. So I want to share it here.

    Change your git-config like this:

    [difftool "bc3_all"] cmd = "git difftool --tool=bc3_single \"$REMOTE\" &" [difftool "bc3_single"] cmd = "bcomp \"$REMOTE\" \"$LOCAL\""

    My first attempt was to start BC3 directly as a background process:

    [difftool "bc3"] cmd = "bcomp \"$REMOTE\" \"$LOCAL\" &"

    It did not work, because $LOCAL is usually a temparary file.
    When the BC3 window(s) show up, the $LOCAL file is already deleted.