I am using this (bash):
git diff $(git log -1 --pretty=format:"%H" somefile)^! -- somefile
Is there a simpler way to do it?
For the most recent changes to a file:
git log -p -1 <filename>
For all changes to a file:
git log -p <filename>
or, to get a graphical view:
gitk <filename>
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