Re: Cherry-pick particular object

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

 



On Tue, 28 Mar 2006 11:31:07 -0500
Sébastien Pierre <sebastien@xxxxxxxxxx> wrote:

> Hi all,
> 
> This is a newbie question.
> 
> I recently wanted to "cherry" pick a particular file from my 
> git-managed project history. Using gitk, I identified which was 
> the revision I wanted (95ba0c74e03874e8c1721b91f92f161e9061621f), 
> and then using git ls-tree, I managed to get the id of the file I 
> wanted (78132af26431e649a0f85f22dc27e5787d80700f).
> 
> Now, what I simply wanted was to do something like:
> 
> "get the file corresponding to 78132af26431e649a0f85f22dc27e5787d80700f 
>  and save it as myfile.txt"
> 
> How would one properly do that with core git ?

If you used:

$ git cat-file -t 78132af2643

It would tell you that this object is of type "blob".
To see the contents of blobs you can do something like:

$ git cat-file blob 78132af2643

Sean

-
: 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]