no such file or directory что делать git

Git no such file or directory

I’m building an application and as always I’m using Git for version control.

Below are the inputs and outputs, hope you can help me:

How can I fix this?

no such file or directory что делать git. Смотреть фото no such file or directory что делать git. Смотреть картинку no such file or directory что делать git. Картинка про no such file or directory что делать git. Фото no such file or directory что делать git

3 Answers 3

OK that happened to me and it turns out that the new windows «controlled folder» protection feature is blocking git. adding git to the allowed apps list solved the problem.

no such file or directory что делать git. Смотреть фото no such file or directory что делать git. Смотреть картинку no such file or directory что делать git. Картинка про no such file or directory что делать git. Фото no such file or directory что делать git

Pathname too long problem

Given that the OP has already tried removing and re-adding the file without success, it is possible that the crux of the problem is that the complete path of Con.php has hit the 260 character limit in windows. However, when I tried to reproduce this problem, the error message clearly said fatal: unable to stat ‘very/long/path/name’: Filename too long so am not certain that that is the problem.

To check if this is the problem, switch to the directory containing Con.php and execute the following:

That should give you a count of the number of characters in the windows path of the current directory. If the count is not >=260 then this is not the problem and I would recommend moving on to Debugging other issues section below. However, if the count is >= 260, then proceed as follows:

and then try adding the file again.

See this in action below, which creates a path with >260 characters and the sets the above option to prove that it fixes the problem.

Why is this configuration not the default?
If you were wondering about that, read this:

Windows does not properly support files and directories longer than 260 characters. This applies to Windows Explorer, cmd.exe and many other applications (including many IDEs as well as bash, perl and tcl that come with Git for Windows).

and note this caveat:

Scripted git commands may still fail with this option, so use at your own risk

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *