Last Updated: February 25, 2016
·
771
· sheerun

Show past file and directory contents using Git command

Display contents of hello.txt file 5 commits before:

git show HEAD~5:hello.txt

Display the tree of first version of software:

git show v1.0.0:

Generally, just separate revision and path with colon:

git show awesome-feature:app/models
git show awesome-feature:app/models/user.rb

It's really that simple :)