All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: Alan Mackenzie <acm@muc.de>
Cc: git@vger.kernel.org
Subject: Re: How do I get the file contents from an arbitrary revision to stdout?
Date: Fri, 8 Oct 2021 14:01:23 -0400	[thread overview]
Message-ID: <20211008180123.ls62virahqthgpmb@meerkat.local> (raw)
In-Reply-To: <YWCFFcNeNVTYcELN@ACM>

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

  reply	other threads:[~2021-10-08 18:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08 17:51 How do I get the file contents from an arbitrary revision to stdout? Alan Mackenzie
2021-10-08 18:01 ` Konstantin Ryabitsev [this message]
2021-10-08 18:15   ` Alan Mackenzie
2021-10-08 20:02 ` Jeff King
2021-10-08 21:54   ` Junio C Hamano
2021-10-08 23:01     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211008180123.ls62virahqthgpmb@meerkat.local \
    --to=konstantin@linuxfoundation.org \
    --cc=acm@muc.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.