Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Using git, how do I see a file at a specific revision without checking it out?

I've asked this question a thousand times and can never remember the obscure way git goes about it.

share|improve this question

1 Answer 1

git show rev:path

rev is a revision specified according to the rules in git-rev-parse(1); e.g. a commit hash or a brach name.

path is the path to a file; relative to the repository root by default, but relative to current directory if prefixed with ./.

share|improve this answer
    
What and by commit you mean the commit code? And by file the file's name? Or its path? Can you expand your answer a little? –  slhck Jun 16 '12 at 18:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.