Re: Restoring files from old commits

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

 



Alex Riesen <raa.lkml@xxxxxxxxx> writes:

> martin f krafft, Sat, Jul 14, 2007 14:37:54 +0200:
>> also sprach Nikodemus Siivola <nikodemus@xxxxxxxxxxxxxxxx> [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



-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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