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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

I would like there to be a command something like:

    $ git cat bar-branch -- foo.c

..  Is there such a command, and if so, what's it called and how do I use
it?  I assumed it might be git cat-file, but I couldn't get it to work,
and couldn't understand it's man page.

Where might I have found this information for myself?

Thanks in advance for the help!

-- 
Alan Mackenzie (Nuremberg, Germany).



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux