From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Peter Krefting <peter@softwolves.pp.se>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Get a copy of an old version of a file, using git gui/gitk
Date: Fri, 19 Sep 2008 10:20:47 +0200 [thread overview]
Message-ID: <20080919082047.GA10733@atjola.homenet> (raw)
In-Reply-To: <Pine.LNX.4.64.0809190855060.17960@ds9.cixit.se>
On 2008.09.19 08:58:04 +0100, Peter Krefting wrote:
> From the command line, I would try to find the SHA-1 and use git
> cat-file, but I can't figure out how to do it from the GUIs. Or, to
> fall back to the command-line, how to get the SHA-1 for the object out
> of git gui/gitk.
You don't need the sha1 of the blob object, just the revision and the
filename, and then you can reference the blob using the
<tree-ish>:<path> syntax.
For example:
git cat-file blob HEAD^^^:some/file.c
or less plumb-ish:
git show HEAD^^^:some/file.c
I've been told that neither cares about the CRLF conversion, and I don't
know if there's anything except "git checkout" that actually does care
about it. With checkout, you would do:
git checkout HEAD^^^ -- some/file.c
But that replaces the current version of that file in your working tree
and index with the version from the HEAD^^^ revision, so that might not
be exactly what you were looking for.
Björn
next prev parent reply other threads:[~2008-09-19 8:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-19 7:58 Get a copy of an old version of a file, using git gui/gitk Peter Krefting
2008-09-19 8:20 ` Björn Steinbrink [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-19 8:32 dhruva
2008-09-19 9:12 ` Björn Steinbrink
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=20080919082047.GA10733@atjola.homenet \
--to=b.steinbrink@gmx.de \
--cc=git@vger.kernel.org \
--cc=peter@softwolves.pp.se \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox