概述
.git/objects文件夹 存储 文件及提交信息
commit->tree->blob
commit的信息:tree+parent+author
tree: blob的信息+blob的文件名
blob:文件的内容的sha-1值
.git/refs/heads文件夹存储分支信息
每个文件分别存储其分支的当前快照的commit 值
git提供的一些api
cat-file -t(查看类型) -p(查看内容) blobfilename
hash-object filename 压缩成二进制文件,存入 Git,并给出sha-1值
ls-files --stage(暂存区) 显示某个区(工作区 暂存区 历史提交区)的内容
sha-1值
长度=2+38
网友评论