关于git:git常见问题总结

2次阅读

共计 365 个字符,预计需要花费 1 分钟才能阅读完成。

git 常见问题总结

git 对象彼此关系

commit、tree、blob

tree –> 文件夹
blob –> 文件

一个 commit 对应一个 tree,tree 嵌套多层

commit 记录此时 git 仓库的快照,

➜  git_repo git:(master) git cat-file -p e1ba46e
tree c7ba4c4219xxxxxx
parent 67cb0637xxxxx
parent ac22ba90cxxxxx
author who <who@gmail.com> 159xxxxx +0800
committer who <who@gamil.com> 159xxxx +0800

拆散头指针

拆散头指针状态就是 HEAD 不再指向分支,而是间接指向某个 commit。
变更未基于某个 branch 或者某个 tag,当进行分支切换时,在拆散头指针上产生的变更很可能被 git 抛弃。

正文完
 0