Re: Cherry-pick particular object
- From
sean <seanlkml@sympatico.ca>
- Date
- Mar 28, 2006, 21:34 UTC
- Message-ID
- <BAYC1-PASMTP02B05019F52DE48793CB39AED30@CEZ.ICE>
- In-Reply-To
- <20060328113107.20ab4c21.sebastien@xprima.com>
On Tue, 28 Mar 2006 11:31:07 -0500 Sébastien Pierre <sebastien@xprima.com> wrote:
Show 16 quoted lines
> 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