Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
愚蠢的菜鸟错误。在 /usr/local/Library 中初始化一个 git 存储库。
git init git add -A
哎呀,不想提交所有这些文件
git rm -rf . ls # EMPTY
没有进行初始提交,因此git reset HEAD不起作用。有没有办法恢复我的 /usr/local/Library 目录的内容?
git reset HEAD
我刚试过这个,看来你不走运。
如果您使用的是 OS X 或 Linux,请尝试使用以下命令查看 .git 文件夹:
find .git -type f