Re: Extracting a single commit or object

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

 



yitzhakbg <yitzhakbg@xxxxxxxxx> wrote:
> 
> How would I extract a single commit from a repository by it's SHA1 (or any
> other treeish)?
> For that matter, how is any one single object extracted? Examples please.

git cat-file $type $sha1

e.g.

git cat-file commit $commitsha1
git cat-file blob $blobsha1

If you need to inspect a tree, ls-tree is probably better:

git ls-tree $commitsha1
git ls-tree $treesha1

-- 
Shawn.
--
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