转载自 https://segmentfault.com/q/1010000003036343
问题:git 提交 遇到 unpack failed: error Missing commit,查看日志信息当前commit提交成功,并且已存在库中
可能原因:本地索引出现异常(出现异常的原因暂时不明)
解决办法:
- $git gc
- $git pull --rebase
- $git push ···
gc指令说明: https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git-gc.html