Thread (4 messages) flat view 4 messages, 3 authors, 2021-10-08

Re: How do I get the file contents from an arbitrary revision to stdout?

From: Konstantin Ryabitsev <hidden>
Date: 2021-10-08 18:01:29

On Fri, Oct 08, 2021 at 05:51:17PM +0000, Alan Mackenzie wrote:
Hello, git.

I want to get a file's content from a particular revision onto stdout for
backup purposes.  I can't see how to do this.  Help me, please!

Let's say the file is foo.c, and I want to get the version from the head
revision of bar-branch.
git show bar-branch:foo.c

-K
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help