Beyond Compare Git Directory Diff with working directory

Issue

How can we do a git directory comparison with the working directory in BeyondCompare?

Solution

  1. configure BeyondCompare as the standard diff tool for the git directory compare

    git config --global difftool.bc.path "c:/Program Files/Beyond Compare 4/bcomp.exe"
    
  2. Then you are already able to do a directory diff through the command prompt which is opened in BeyondCompare.
    You can use the hashes or branch names

    git difftool --dir-diff eb90e84e2996ac90cd67e91affdd1153d96b0ee3 b4650e6207702c99985dc48ed3c65db2b204fcee
    
  3. If you want to do a comparison with the local files in the working directory you have to add the symlink command

    git difftool --dir-diff --symlinks  b4650e6207702c99985dc48ed3c65db2b204fcee head
    

    before you must enable symlinks

    git config --global core.symlinks true
    git config core.symlinks true
    
  4. Then git is creating symlinks which points to the local files.

  5. To reach, that BeyondCompare does the comparison between the local file behind the symlink and the versioned file from the history, you must configure that BC follows symbolic links

    enter image description here

  6. And then you get this

    BeyondCompare comparison

Answered By – Heiko Averbeck

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published