git fatal:ambiguous argument HEAD: unknown revision or path not in the working tree. 解決方案

0x00 解決方案

Ubuntu 14.04 在運行git init後,編譯文件顯示fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.錯誤。

解決方案  輸入命令 

git commit --allow-empty -n -m "Initial commit"

提示需要身份驗證,輸入身份驗證:

git config --global user.email "[email protected]"
git config --global user.name "aaaa"

再次git commit --allow-empty -n -m "Initial commit",  然後make成功。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章