Friday, May 10, 2013

Doing a Diff on a Specific Git Version

Sometimes you just need to look up something that changed between versions of a repository instead of reverting a full file, here two git commands come in handy.

The first shows the log of your recent commits, along with hex numbers which represent the versions:
git log
When you find the revision you want, just type:
git show af78ec673f46db23ae5537a8dbea1253e6e844f3
replacing the revision number with the one you want, and you'll get a diff from that version!

No comments:

Post a Comment