user116032 user116032 - 6 months ago 49
Git Question

Can you git diff without knowing the previous commit?

git diff id_old id_newer

Is the standard simple use of git diff. Can you give git diff the new commit id alone and ask it to report the diff between it and the previous file changing commit without knowing it?
Something like:

git diff id_newer --fromlastchange (vs --fromlastcommit)


You should try to do

git diff id_newer^!

Which should give you the changes of the id_newer commit.