git 报错does not have a commit checked out

git 报错does not have a commit checked out

描述

当git add .后,报错

error: 'xxx' does not have a commit checked out
fatal: adding files failed

原因

该文件夹下有隐藏文件,删除掉即可

重新push

git add .
git commit -m "test add ."
git push origin master
posted @ 2022-02-28 11:55  wonder32  阅读(7869)  评论(0)    收藏  举报