Git 'fatal: No such ref: HEAD'
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: A weird thing happend to my git repository. When I try to commit something in tortoisegit window I receive all files from project. I cannot revert them, when I pull from server I receive fatal: No such ref: HEAD and fatal: Cannot lock the ref 'HEAD' . All my local branches are missing. Is there any way to resolve the problem? This is not first commit or something. This thing happend suddenly. EDIT: git branch -a says: Failed to resolve HEAD as a valid ref git status prints all project files marked as new file. I changed repository folder