我的一个git repos 删除所有文件时遇到问题 commit。
我查看了项目的 .git 目录,发现了一大堆索引。看看这个:
$ ls .git
COMMIT_EDITMSG index (from Niflheimr - 2)
FETCH_HEAD index (from Niflheimr - 3)
HEAD index (from Niflheimr - 4)
ORIG_HEAD index (from Niflheimr - 5)
config index (from Niflheimr - 6)
description index (from Niflheimr - 7)
github-mac-index index (from Niflheimr - 8)
hooks index (from Niflheimr - 9)
index (from Niflheimr - 10) index (from Niflheimr)
index (from Niflheimr - 11) info
index (from Niflheimr - 12) logs
index (from Niflheimr - 13) objects
index (from Niflheimr - 14) refs
index (from Niflheimr - 15) sequencer
index (from Niflheimr - 16)
我认为他们很糟糕,他们应该离开。我不确定 git 的方法是什么来治愈这个问题,以及将来我能做些什么来防止这种情况发生。