[git] fatal: This operation must be run in a work tree

来源:互联网 发布:电脑免费恢复数据软件 编辑:程序博客网 时间:2024/06/12 01:07

        在使用git  init --bare 进行建立裸仓库之后,在使用git 其它的命令都会出现fatal:This operation must be run in a work tree 问题,处理方法:

        先touch readme 因为在创建裸仓库时,没有生成readme 文件,出现不能提交的情况。之后就可以使用git init,git add readme

 git commit等命令了。

0 0