Git错误致命:无法统计'*':没有这样的文件或目录 [英] Git error fatal: unable to stat '*': No such file or directory

查看:454
本文介绍了Git错误致命:无法统计'*':没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了这个错误,并且找不到关于如何在线修复它的文档。我试图运行命令 git add。,并收到以下回复:

致命:无法统计'myPathToAFile':没有这样的文件或目录

解决方案

该文件来自git,然后通过执行以下操作重新添加它:

git rmmyPathToAFile



git add。



git commit -am'我的提交'



希望这有助于其他人!


I ran into this error, and found very little documentation on how to fix it online. I got the error by trying to run the command git add ., and received this response:

fatal: unable to stat 'myPathToAFile': No such file or directory

解决方案

To solve the problem, I removed the file from git, then re-added it by doing the following:

git rm "myPathToAFile"

git add .

git commit -am 'my commit'

Hope this helps someone else!

这篇关于Git错误致命:无法统计'*':没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆