Re: How do get a specific version of a particular file?
On 2/27/07, Theodore Ts'o <tytso@mit.edu> wrote:
Show 13 quoted lines
>
> So given a particular tree-ish and a pathname, I'd like get the contents
> of that particular file as of a particular revision. i.e., the
> equivalent of:
>
> cvs -r v1.37 -p e2fsck/pass1.c
> or
> bk cat -r 2345 e2fsck/pass1.c
>
> The closest I've been able to come is to use
>
> git archive --format=zip v1.37 e2fsck/pass1.c | gunzip
>
git cat-file -p <objname>:file
I.e.: git cat-file v1.37:e2fsck/pass1.c