- 查看当前branch信息
- git branch
- git log HEAD
- git log master
- git log refs/heads/master
- cat .git/HEAD
- cat .git/refs/heads/master
- git cat-file -t "hash code of .git/refs/heads/master output"
- git cat-file -p "hash code of .git/refs/heads/master output"
- git rev-parse HEAD
- git rev-parse refs/heads/master
- git rev-parse master
呵呵,这里就自己去看图理解啦!
HEAD 是master的一个引用,指向refs/heads/master文件;
master 是最后一次提交;