How can we do a git directory comparison with the working directory in BeyondCompare?
If you configure BeyondCompare as your standard diff tool, like:
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
Diff with working directory
You may have noticed that both sides of compare are in "temp" folder, even if one commit hash is HEAD
, that is to prevent accidental changes to files (diff is just for viewing), but if you need the ability to change local files in the working directory, then follow below steps.
Add the
--symlinks
option andHEAD
to command:git difftool --dir-diff --symlinks b4650e6207702c99985dc48ed3c65db2b204fcee head
But before you must enable symlinks (if not already done):
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
Finally, you get this:
© 2022 - 2024 — McMap. All rights reserved.
--symlinks
causes permission denied). – Relentless