Re: Extracting a single commit or object

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

 



Hi,

On Tue, 30 Dec 2008, yitzhakbg wrote:

> How would I extract a single commit from a repository by it's SHA1 (or 
> any other treeish)?

Your question is not precise enough to answer.  Are you looking for

- the commit message?
- the patch?
- all the files referenced by that commit?
- all the files _and revisions_ referenced by that commit?

The answer depends quite a lot on the question...

> For that matter, how is any one single object extracted? Examples please.

The user-friendly way to look at a tree is

	git show HEAD:Documentation/

or some such.  Likewise, you can inspect single blobs like this:

	git show HEAD:README

If you activated bash completion, you can even complete monsters like 
this:

	git show \
v1.5.3:v1.5.3:t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master

Hth,
Dscho

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