Thread (4 messages) 4 messages, 2 authors, 2016-08-11

Re: How to view an old revision?

flat view

From: Andy Whitcroft <hidden>
Date: 2016-08-11 20:04:54

Matt McCutchen wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help