Wednesday, September 11, 2013

GIT: How to see old version of a file...



You can use git show:

$ git show REVISION:path/to/file

For example, to show the 4th last commit of the file src/main.c, use:

$ git show HEAD~4:src/main.c


Note that the path must start from the root of the repository. For more information, check out the man page for git-show.

No comments: