Wednesday, September 25, 2013

Git show the version prior to the commit hash

getting the verion prior to the current hash point in git is yet another one of the annoying little bits of pointless info that makes people hate unix tools...

http://stackoverflow.com/questions/338436/is-there-a-quick-git-command-to-see-an-old-version-of-a-file

The secret is the "~1" which means prior to the commit hash number you gave. EG
git show commithash~1:path/to/file 

No comments:

Post a Comment