@@ -32,22 +32,27 @@ Initialized empty Git repository in .git/
3232$ echo 'hello world' > file.txt
3333$ git add .
3434$ git commit -a -m "initial commit"
35- Created initial commit 54196cc2703dc165cbd373a65a4dcf22d50ae7f7
35+ [master (root-commit)] created 54196cc: "initial commit"
36+ 1 files changed, 1 insertions(+), 0 deletions(-)
3637 create mode 100644 file.txt
3738$ echo 'hello world!' >file.txt
3839$ git commit -a -m "add emphasis"
39- Created commit c4d59f390b9cfd4318117afde11d601c1085f241
40+ [master] created c4d59f3: "add emphasis"
41+ 1 files changed, 1 insertions(+), 1 deletions(-)
4042------------------------------------------------
4143
42- What are the 40 digits of hex that git responded to the commit with?
44+ What are the 7 digits of hex that git responded to the commit with?
4345
4446We saw in part one of the tutorial that commits have names like this.
4547It turns out that every object in the git history is stored under
46- such a 40-digit hex name. That name is the SHA1 hash of the object's
48+ a 40-digit hex name. That name is the SHA1 hash of the object's
4749contents; among other things, this ensures that git will never store
4850the same data twice (since identical data is given an identical SHA1
4951name), and that the contents of a git object will never change (since
50- that would change the object's name as well).
52+ that would change the object's name as well). The 7 char hex strings
53+ here are simply the abbreviation of such 40 character long strings.
54+ Abbreviations can be used everywhere where the 40 character strings
55+ can be used, so long as they are unambiguous.
5156
5257It is expected that the content of the commit object you created while
5358following the example above generates a different SHA1 hash than
0 commit comments