GIT: error: pathspec 'xxx did not match any file(s) known to git

后端 未结 3 1193
予麋鹿
予麋鹿 2021-02-06 13:17

I have some trouble with a git repository of mine and I cant find the error :(

Thing is, I had this repository already in use for a PHP project. everything was fine. The

3条回答
  •  抹茶落季
    2021-02-06 13:33

    I got this issue due to how many levels deep (length) my folders were. The path name was too long and git couldn't handle it, so I took the folder and threw it on my C: and everything started working fine. Check to see if your folder structure is too long. Ex:

    C:/folder1/folder2/folder3/..../folder99/file.txt

    above is too long, try to make it much shorter. Something like C:/folder1/folder2/file.txt (For all files in the repo) and this should fix the issue.

提交回复
热议问题