'Fatal: Unable to checkout working tree
I am cloning the master branch from a GitHub repo onto my system. It throws this error:
Checking connectivity ...done eate file Icon fatal: unable to checkout working tree warning: Clone succeeded, but checkout failed.
I've tried to include the suggestions for line ending problems in Windows as the help doc suggests but still I am facing the same issue.
How can this be solved?
- Windows 7
Solution 1:[1]
As I know of, you will want to modify any file names containing: \, /, :, *, ?, ", <, >, or |, as Windows does not comply with those symbols for file naming purposes.
A nice and simple "fix" would be to download the files as a zip archive (which is supported by github), then modify the troublesome file names in File Explorer and then, finally, extract the zip archive in your desired directory.
Solution 2:[2]
Some documents in the file name under Windows is illegal. Delete these files to, or use OS X to modify the file name and then clone under Windows.
Solution 3:[3]
Check the error messages carefully. Some file names might be long or some other issues will be there concerning a file. Or maybe there is not enough space. But do git clone on command prompt and go through the last couple of error messages
Solution 4:[4]
I got this error trying to download some repos with blacklisted windows filenames:
error: invalid path 'drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c' notice the file is called aux.c which is a banned word in windows because AUX is a namespace for auxiliary port connections. Backwards compatibility to the stone ages basically.
For a full list of reserved keywords see second-last dotpoint: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#naming-conventions
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Community |
| Solution 3 | Blue Clouds |
| Solution 4 | zkscpqm |
