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

前端 未结 14 1202
难免孤独
难免孤独 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:20

    In order to add a file to git it has to exist. git add does not create a file, but tells git to add it to the current branch you are on and track it. So you should create a new file in the command line :

    MD 
    

    After that you add :

    git add  
    

提交回复
热议问题