I would like to see a specific commit in Beyond Compare or any other separate diff tool while viewing it via git show
. I tried looking at help of git show/difftool/config but couldn't find anything. Does anyone know how it can be done?
I've looked at Git Diff with Beyond Compare and configured Beyond Compare for git difftool
but I also want to use it as tool from git show
I managed to use git difftool
to see commits that I normally used to see via git show
.
git show $commit
translates to git difftool $commit^ $commit
.
The above command shows difference between commit's parent ($commit^) and commit. All this is of course after configuring Beyond Compare with difftool.
You can also create an alias "showtool" to wrap the call to git difftool
:
set +o histexpand git config --global alias.showtool "!sh -c 'if [ -z \$1 ]; then REVISION="HEAD"; else REVISION="\$1"; fi; git difftool \$REVISION~ \$REVISION' -"
.. then you can execute:
git showtool 81e945b
.. or just
git showtool
.. as a shortcut for git difftool 81e945b~1 81e945b
to show the changes introduced in 81e945b
using the configured difftool, or in the second case git difftool HEAD~1 HEAD
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With