我.git/log在搜索git保存stash提交的地方时注意到了.发现:
$ 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
Run Code Online (Sandbox Code Playgroud)
含义stash- 是唯一的唯一文件logs.但它没有说明这个文件夹的基本原理.那么.git/loggit重复引用的目的是什么?为什么?
对 refs 所做的更改的记录 存储在该目录中。有关更多信息,请参阅 git-update-ref 1 。如果设置了 $GIT_COMMON_DIR,则忽略此目录,并将使用“$GIT_COMMON_DIR/logs”。