1查看git对象
git cat-file
实践 git head到底指向的是什么
➜ gittest git:(master) find .git -name HEAD -o -name master
.git/refs/heads/master
.git/HEAD
.git/logs/refs/heads/master
.git/logs/HEAD
➜ gittest git:(master) cat .git/HEAD
ref: refs/heads/master #HEAD文件指向一个引用 (.git/refs/heads/master)
➜ gittest git:(master) cat .git/refs/heads/master #此文件保存了一个commit 此时master HEAD 指向的都是同一个提交 (此时分支位于master) ps:可以根据commit 回朔所有的提及哦
5ee9b85798d8b206bda1a825c60681bca5acff2d