{"thread":{"id":"32022","subject":"how the commit ID come from in GIT?","startedAt":"2012-11-05T20:04:06Z","lastAt":"2012-11-05T23:04:32Z","messageCount":3,"participants":["hong zhang","Magnus Bäck","Konstantin Khomoutov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"202562","messageId":"1352145846.26267.YahooMailClassic@web141404.mail.bf1.yahoo.com","threadId":"32022","inReplyTo":null,"subject":"how the commit ID come from in GIT?","fromName":"hong zhang","fromEmail":"henryzhang62@yahoo.com","sentAt":"2012-11-05T20:04:06Z","receivedAt":"2012-11-05T20:04:06Z","isPatch":false,"sender":{"key":"henryzhang62@yahoo.com","avatar":null},"body":"List,\n\nCould anyone explain how the git commit ID will include all the files that devloper makes changes on?\n\nHow git commit ID works?\n\nThanks for any help!\n\n---henry\n"},{"id":"202563","messageId":"20121105202621.GA31625@google.com","threadId":"32022","inReplyTo":"1352145846.26267.YahooMailClassic@web141404.mail.bf1.yahoo.com","subject":"Re: how the commit ID come from in GIT?","fromName":"Magnus Bäck","fromEmail":"baeck@google.com","sentAt":"2012-11-05T20:26:22Z","receivedAt":"2012-11-05T20:26:22Z","isPatch":false,"sender":{"key":"baeck@google.com","avatar":null},"body":"On Monday, November 05, 2012 at 15:04 EST,\n     hong zhang <henryzhang62@yahoo.com> wrote:\n\n> Could anyone explain how the git commit ID will include all the files\n> that devloper makes changes on?\n>\n> How git commit ID works?\n\nIn short, a Git commit points to a tree object that describes the full\nstate of the source tree plus metadata like the commit author, date,\ndescription, and a pointer to the commit object(s) that preceded the\ncommit. The commit id itself is the SHA-1 of the contents of the commit\nobject. Any change of the source tree will affect the top-level tree\nobject's SHA-1 which in turn affects the SHA-1 of the commit. Also,\nbecause a commit contains the timestamp of the commit object's creation\neven two commits that are content-wise identical will have different\nSHA-1s.\n\nIf you haven't read it, the Pro Git books explains Git's object model in\ndetail: http://git-scm.com/book/en/Git-Internals-Git-Objects\n\nThat description is quite detailed, and most users don't need to go that\ndeep.\n\n-- \nMagnus Bäck\nbaeck@google.com\n"},{"id":"202572","messageId":"20121105230430.GK5210@localhost.localdomain","threadId":"32022","inReplyTo":"1352145846.26267.YahooMailClassic@web141404.mail.bf1.yahoo.com","subject":"Re: how the commit ID come from in GIT?","fromName":"Konstantin Khomoutov","fromEmail":"kostix+git@007spb.ru","sentAt":"2012-11-05T23:04:32Z","receivedAt":"2012-11-05T23:04:32Z","isPatch":false,"sender":{"key":"kostix+git@007spb.ru","avatar":null},"body":"On Mon, Nov 05, 2012 at 12:04:06PM -0800, hong zhang wrote:\n\n> Could anyone explain how the git commit ID will include all the files\n> that devloper makes changes on?\n> \n> How git commit ID works?\n\nTo expand on the answer provided by Magnus, I would also suggest reading\nthe classic \"Git from the bottom up\" document [1], and if you want a\ntotally informal and fun introduction to how these cryptographic hashes\ncome about and why they are useful, I suggest reading\n\"The Git Parable\" [2].\n\n1. http://newartisans.com/2008/04/git-from-the-bottom-up/\n2. http://tom.preston-werner.com/2009/05/19/the-git-parable.html\n"}]}