user116032 user116032 - 1 year ago 87
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)

Answer Source

You should try to do

git diff id_newer^!

Which should give you the changes of the id_newer commit.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download