How can we do a git directory comparison with the working directory in BeyondCompare?
How can we do a git directory comparison with the working directory in BeyondCompare?
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"
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
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
Then git is creating symlinks which points to the local files.
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
And then you get this
There is one small restriction:
The symlink to the local file is only created when the content is already commited, see https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---no-symlinks