* how the commit ID come from in GIT?
@ 2012-11-05 20:04 hong zhang
2012-11-05 20:26 ` Magnus Bäck
2012-11-05 23:04 ` Konstantin Khomoutov
0 siblings, 2 replies; 3+ messages in thread
From: hong zhang @ 2012-11-05 20:04 UTC (permalink / raw)
To: git
List,
Could anyone explain how the git commit ID will include all the files that devloper makes changes on?
How git commit ID works?
Thanks for any help!
---henry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how the commit ID come from in GIT?
2012-11-05 20:04 how the commit ID come from in GIT? hong zhang
@ 2012-11-05 20:26 ` Magnus Bäck
2012-11-05 23:04 ` Konstantin Khomoutov
1 sibling, 0 replies; 3+ messages in thread
From: Magnus Bäck @ 2012-11-05 20:26 UTC (permalink / raw)
To: hong zhang; +Cc: git
On Monday, November 05, 2012 at 15:04 EST,
hong zhang <henryzhang62@yahoo.com> wrote:
> Could anyone explain how the git commit ID will include all the files
> that devloper makes changes on?
>
> How git commit ID works?
In short, a Git commit points to a tree object that describes the full
state of the source tree plus metadata like the commit author, date,
description, and a pointer to the commit object(s) that preceded the
commit. The commit id itself is the SHA-1 of the contents of the commit
object. Any change of the source tree will affect the top-level tree
object's SHA-1 which in turn affects the SHA-1 of the commit. Also,
because a commit contains the timestamp of the commit object's creation
even two commits that are content-wise identical will have different
SHA-1s.
If you haven't read it, the Pro Git books explains Git's object model in
detail: http://git-scm.com/book/en/Git-Internals-Git-Objects
That description is quite detailed, and most users don't need to go that
deep.
--
Magnus Bäck
baeck@google.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how the commit ID come from in GIT?
2012-11-05 20:04 how the commit ID come from in GIT? hong zhang
2012-11-05 20:26 ` Magnus Bäck
@ 2012-11-05 23:04 ` Konstantin Khomoutov
1 sibling, 0 replies; 3+ messages in thread
From: Konstantin Khomoutov @ 2012-11-05 23:04 UTC (permalink / raw)
To: hong zhang; +Cc: git
On Mon, Nov 05, 2012 at 12:04:06PM -0800, hong zhang wrote:
> Could anyone explain how the git commit ID will include all the files
> that devloper makes changes on?
>
> How git commit ID works?
To expand on the answer provided by Magnus, I would also suggest reading
the classic "Git from the bottom up" document [1], and if you want a
totally informal and fun introduction to how these cryptographic hashes
come about and why they are useful, I suggest reading
"The Git Parable" [2].
1. http://newartisans.com/2008/04/git-from-the-bottom-up/
2. http://tom.preston-werner.com/2009/05/19/the-git-parable.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-05 23:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-05 20:04 how the commit ID come from in GIT? hong zhang
2012-11-05 20:26 ` Magnus Bäck
2012-11-05 23:04 ` Konstantin Khomoutov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).