我注意到在寻找git保存stash提交的地方时出现了
.git/log
。我发现:$ ls .git/logs/
HEAD refs
$ diff .git/refs/ .git/logs/refs/ | head -n3
Common subdirectories: .git/refs/heads and .git/logs/refs/heads
Common subdirectories: .git/refs/remotes and .git/logs/refs/remotes
diff .git/refs/stash .git/logs/refs/stash
意义: stash
- 是在logs
下唯一的独特文件。但它并没有阐明这个文件夹的目的。那么,.git/log
的目的是什么,为什么Git会复制引用?