Guangyu Chen
2013/11/2
mkdir 1102
cd 1102
git init
git config
git config
echo hello
git add .
git commit
git tag –a

user.name “chin”
user.email “chin@dummy.com”
> hello.txt
–m “commit hello.txt”
v1.5 –m “test tag”
Format:
“blob” SP “(contents size)" NUL “(contents)" LF
Sample:
blob 6
hello
Sha-1:
ce013625030ba8dba906f756967f9e9ca394464a
Format:
“tree” SP “(contents size)" NUL “(contents)“
Sample:
tree 37
100644 hello.txt
CE 01 36 25 03 0B A8 DB A9 06 F7 56 96 7F 9E 9C A3 94 46 4A
Sha-1:
aaa96ced2d9a1c8e72c56b253a0e2fe78393feb7
Format:
“commit” SP “(contents size)" NUL “(contents)" LF
Sample:
commit 159
tree aaa96ced2d9a1c8e72c56b253a0e2fe78393feb7
author chin <chin@dummy.com> 1383319258 +0900
committer chin <chin@dummy.com> 1383319258 +0900
commit hello.txt
Sha-1:
8f9e9972c57f8380690baa7bf30d4a6dd9331a99
Format:
“tag” SP “(contents size)" NUL “(contents)" LF
Sample:
tag 125
object 8f9e9972c57f8380690baa7bf30d4a6dd9331a99
type commit
tag v1.5
tagger chin <chin@dummy.com> 1383383976 +0900
test tag
Sha-1:
6a78ea64ba8b4ae4647e5acb58fd7bce62e307b6
6a78e..
tag

size

commit

8f9e9..

tag

v1.5

tagger

chin

test tag

8f9e9..
commit

size

tree

aaa96..

author

chin

committer

chin

aaa96..
tree
blob

size

ce013.. hello.txt

ce013..
blob

hello
commit hello.txt

Pro Git book

size

Git objects v2