I am getting the following error when trying to clone a repository with git:
Fatal: Unable to checkout working tree
warning: Clone succeeded, but failed checkout.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
Additionally, the following message appears in several files: 'error: Unable to create file'
https://i.sstatic.net/QIBr3.png
By using the 'git status' command, I see that many files were marked as deleted [actually the files still exist]
https://i.sstatic.net/RX36z.png
I used the git checkout -f HEAD
command as was requested in the first mistake, but the result was the following
https://i.sstatic.net/PO8Rf.png
Your files has special characters which are not allowed under windows. This is why you cannot checkout the file names.
The only way to fix it is to clone the repository on non windows machine and to rename them.
The following characters are forbidden in file names (Win)
The following reserved characters:
< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With