在 Windows Git 上,仅在以下情况下存在引用不同的问题:
$ git branch foo
$ git branch FOO
fatal: A branch named 'FOO' already exists.
$ git branch dir/foo
$ git branch DIR/bar
$ git branch --list
* develop
foo
dir/bar
dir/foo
这可以通过 Git 使用文件系统将 refs 作为文件存储在目录foo
中来解释。bar
<repository>/.git/refs/heads/dir
$ git branch --delete dir/bar
$ git branch --delete dir/foo
$ git branch --list
* develop
foo
较旧的 Git 版本似乎<repository>/.git/refs
在较新的 Git 版本中删除了一些空目录。
<repository>/.git/refs
手动删除空目录是否安全?