error: ‘FirstProject/‘ does not have a commit checked outfatal: adding files failed报错

error: ‘FirstProject/‘ does not have a commit checked outfatal: adding files failed报错_第1张图片

git add 文件

产生原因:在文件的子目录中还存在.git的隐藏文件,所以报错
解决办法:删除子目录.git即可 

你可能感兴趣的:(报错,error)