mkdir proj
cd proj
git init
echo 'test' > first
git hash-object -w first # got a sha1 as s1
git update-index --add --cacheinfo 100644 s1 first
git write-tree # got a sha1 as s2
git commit-tree s2 -m " "# got a sha1 as s3
git -c core.logAllRefUpdates=True update-ref refs/heads/master s3
echo 'test' > second
git hash-object -w first # got a sha1 as s1
git update-index --add --cacheinfo 100644 s1 second
git write-tree # got a sha1 as s2
git commit-tree s2 -p master -m " " # got a sha1 as s3
git -c core.logAllRefUpdates=True update-ref refs/heads/master s3
comment