HUGE shoutout to Jeff Knowlton for telling me about git difftool –dir-diff:
This is how to set the path for Beyond Compare:
git config --global difftool.bc3.cmd "\"c:/Program Files/Beyond Compare 4/BCompare.exe\" \"$LOCAL\" \"$REMOTE\""
(use your path to your installation, of course)
Then, add an alias:
git config --global alias.diffdir = "difftool --dir-diff --tool=bc3 --no-prompt"
(Please note: the –tool & –no-prompt switches are important to ensure it runs with Beyond Compare, regardless of what difftool is set as default, either locally or globally).
Using this trick, I can do a full directory comparison of my ANY TWO COMMITS (snapshots) by simply typing:
git diffdir any-branch-name any-other-branch-name
Of course, since a branch is just a pointer to a SHA-1 hash, you can also pass hashes:
git diffdir 4bc7ba80edf6 7f566710c7
…or a mix of a branch name & a SHA-1 hash:
git diffdir master 4bc7ba80edf6
COOLEST TRICK EVER – (so cool I had to share)
SO HELPFUL. Thanks, Jeff!!!