In $VCS I make heavy use of $VCS diff -c $N to see only the changes introduced in revision $N (ie, diff -r $N..$N+1).
How can I do the same thing with git?
# git show -p SHA1_COMMIT
git diff SHA1_COMMIT^ SHA1_COMMIT
With SHA1_COMMIT being the SHA1 of the commit you want to inspect.
That "git diff" will compare:
As mentioned in the source code of the builtin-diff.c, the syntax parsed is:
static const char builtin_diff_usage[] =
"git diff <options> <rev>{0,2} -- <path>*"
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