git init
echo 'I am foo' > foo.txt
git add foo.txt # this woould create a git commit object
echo ' I am foo2' > foo.txt
git add foo.txt # this would create another git commit object
git commit -m 'doe' # this would create two git
# objects: one commit object and one tree object
Как получить список всех 4 коммитов SHA1_HASH?
cd .git/objects
ls
(master)$ ls -al
total 0
drwxr-xr-x 8 nsingh staff 272 Mar 27 16:44 .
drwxr-xr-x 13 nsingh staff 442 Mar 27 16:44 ..
drwxr-xr-x 3 nsingh staff 102 Mar 27 16:44 37
drwxr-xr-x 3 nsingh staff 102 Mar 27 16:43 a2
drwxr-xr-x 3 nsingh staff 102 Mar 27 16:44 e1
drwxr-xr-x 3 nsingh staff 102 Mar 27 16:42 e6
drwxr-xr-x 2 nsingh staff 68 Mar 27 16:42 info
drwxr-xr-x 2 nsingh staff 68 Mar 27 16:42 pack
Я могу найти список всех 4 коммитов, посмотрев здесь файл, но должен быть лучший способ.