通过删除HEAD可以将存储库还原到新状态,您可以在其中创建新的初始提交: git update-ref -d HEAD 创建新提交后,您需要强制它到远程,以覆盖以前的初始提交: git push --force origin