Fatal: pathspec 'file.txt' did not match any files, GIT

前端 未结 14 1201
难免孤独
难免孤独 2021-02-04 11:59

I have just started learing GIT. Follow their tutorial.

Now at the very beginning I got stuck with this error:

Fatal: pathspec \'file.txt\' did not match         


        
14条回答
  •  孤独总比滥情好
    2021-02-04 12:00

    I was having the same issue but with the Windows file system. Here was my solution that worked.

    from the git project directory. Here is exactly what was displayed with the current directory.

    D:\Projects\ReactNative\project>git add "scr/\components/\validate.js"

    The file being entered into git was validate.js. It was in a directory under the project. That directory was src\components.

提交回复
热议问题