From: Alex Riesen Date: Tue, 27 Feb 2007 12:49:42 GMT Subject: Re: How do get a specific version of a particular file? Message-ID: <81b0412b0702270449r7aced195xa0a24af78d94243a@mail.gmail.com> In-Reply-To: On 2/27/07, Theodore Ts'o wrote: > > 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 :file I.e.: git cat-file v1.37:e2fsck/pass1.c