git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How to view an old revision?

From
Andy Whitcroft <apw@shadowen.org>
Date
Nov 1, 2006, 14:30 UTC
Message-ID
<4548AFA2.1040606@shadowen.org>
In-Reply-To
<3bbc18d20611010620m11e40402v44334a8c486a4932@mail.gmail.com>
Matt McCutchen wrote:
Show 6 quoted lines
> Dear git people,
> 
> How do I view an old revision of a file without actually checking it
> out?  This would be analogous to "cvs checkout -r <old> -p".  I've
> RTMed and STWed and can't seem to find a way.
> 
Something like the following:
	git cat-file -p <commit-ish>:<file>
For example:
	git cat-file -p tags/v1.4.3:git.c
	git cat-file -p f5f75c652b9c2347522159a87297820103e593e4:git.c
Previous: Matt McCutchenNext: Matt McCutchen
Message 2 of 7 in “How to view an old revision?”
  1. Matt McCutchenNov 1, 2006
  2. Andy WhitcroftNov 1, 2006
  3. Matt McCutchenNov 1, 2006
  4. Andy WhitcroftNov 1, 2006
  5. Junio C HamanoNov 1, 2006
  6. Matt McCutchenNov 1, 2006
  7. Andy WhitcroftNov 1, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.