Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .