Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

github - Git error fatal: unable to stat '*': No such file or directory

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...