git对象
git对象分类
Git对象分为 tree(目录树),commit(当前提交),parent(parent-commit,父提交,即上次提交),blob(文件)
git对象类型查看
git cat-file -t e665431
git cat-file -t 查看ID对应的对象类型,ID可以用前几位作为简写,位数没有限制,只要不与其他对象冲突即可
对象保存的位置
git对象保存在./git/objects/
下,ID前两位作为文件目录,后38位作为文件名。
git对象成员结构
#图1
------------------
commit 1
Id = e69655
Tree = f58737---------------->| tree 1 |
Parent = a088172 | Id = f58737|
Author = wz | files{ |
----------------- | / |
commit 2(parent of commit 1) | . |
Id = a088172 | index.php-|