From: Junio C Hamano <gitster@pobox.com>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: git@vger.kernel.org,
Nikodemus Siivola <nikodemus@random-state.net>,
martin f krafft <madduck@madduck.net>
Subject: Re: Restoring files from old commits
Date: Sat, 14 Jul 2007 11:50:49 -0700 [thread overview]
Message-ID: <7vbqeeizue.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20070714143233.GC2544@steel.home> (Alex Riesen's message of "Sat, 14 Jul 2007 16:32:33 +0200")
Alex Riesen <raa.lkml@gmail.com> writes:
> martin f krafft, Sat, Jul 14, 2007 14:37:54 +0200:
>> also sprach Nikodemus Siivola <nikodemus@random-state.net> [2007.07.14.1409 +0200]:
>> > What is the recommended way to restore individual files
>> > (or directories) in the working tree to the content they
>> > had in a given commit?
>>
>> As per my comment on IRC, I think
>>
>> git checkout <tree-ish> <path>
>>
>> is the way.
>
> It does not work for directories, though.
Are you sure about that? I just did this in my git.git workspace:
$ mv Documentation Documentation-
$ git checkout HEAD Documentation/
$ diff -r Documentation- Documentation
next prev parent reply other threads:[~2007-07-14 18:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-14 12:09 Restoring files from old commits Nikodemus Siivola
2007-07-14 12:37 ` martin f krafft
2007-07-14 14:32 ` Alex Riesen
2007-07-14 18:50 ` Junio C Hamano [this message]
2007-07-15 8:41 ` Alex Riesen
2007-08-15 17:22 ` Nikodemus Siivola
2007-08-15 17:28 ` Salikh Zakirov
2007-08-15 18:27 ` Uwe Kleine-König
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=7vbqeeizue.fsf@assigned-by-dhcp.cox.net \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=madduck@madduck.net \
--cc=nikodemus@random-state.net \
--cc=raa.lkml@gmail.com \
/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.