0

I am facing an issue with git.

I was cloning my git repo with git clone However, i get this error message. and the project folder is empty.

When i search about this issue online, people suggested git reset but i got an error saying

error: invalid path 'nodejs/blog_mvc/public /style.css'
fatal: make_cache_entry failed for path 'nodejs/blog_mvc/public /style.css'

I am not getting what this error message is telling me to do.

Cloning into 'WebApps'...
remote: Enumerating objects: 488, done.
remote: Counting objects: 100% (488/488), done.
remote: Compressing objects: 100% (272/272), done.
remote: Total 5294 (delta 201), reused 426 (delta 142), pack-reused 4806
Receiving objects: 100% (5294/5294), 10.40 MiB | 2.91 MiB/s, done.
Resolving deltas: 100% (1361/1361), done.
error: invalid path 'nodejs/blog_mvc/public /style.css'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

and as it suggested, i did git restore --source=HEAD :/ and i got this error.

error: invalid path 'nodejs/blog_mvc/public /style.css'

when i checked git status, everything in the project was deleted. But on my github account, everything is still there as usual.

Can someone tell me what is going on? I am not sure if the best solution is rollback to the previous commit and start from there or if i could figure out in a better way, please let me know. that would help me.

Thank you in advance.

mike
  • 1,239
  • 1
  • 14
  • 32
keppodon
  • 55
  • 1
  • 6
  • Well everything is there in your clone. But the checkout to the working folder failed, so the folder appears empty. – matt Aug 13 '20 at 04:37
  • 1
    This is a typical Windows issue. See for example https://stackoverflow.com/questions/61614004/cloning-succeded-but-checkout-failed-due-to-invalid-path-what-is-the-path-probl – matt Aug 13 '20 at 04:39
  • have you tried removing the space in the path after the public folder? – jason_r Aug 13 '20 at 04:40
  • Yes but he can’t do it here, it has to done at the server. – matt Aug 13 '20 at 04:44
  • Although your bad path name has a space in it (which Windows normally allows) rather than being a file named `aux`, this really is the same problem matt linked above. Apparently Windows forbids a space just before the slash-separator. – torek Aug 13 '20 at 04:51
  • Does this answer your question? [Cloning succeded but checkout failed due to invalid path. What is the path problem?](https://stackoverflow.com/questions/61614004/cloning-succeded-but-checkout-failed-due-to-invalid-path-what-is-the-path-probl) – user3840170 Aug 13 '20 at 04:56
  • thank you for helping. the other question is i am trying to remember where I put the path with space. coz I do not remember making such path in my project. – keppodon Aug 13 '20 at 04:58
  • So am I supposed to change a file name? i have read the link above, but I cannot really see as the same issue. because the issue posted there is due to Aux as a file name. and I double-checked my project files, i do not have path of ```nodejs/blog_mvc/public /style.css```. where does this invalid path come from ? – keppodon Aug 13 '20 at 05:14
  • The invalid path is in a file stored in the commit at the tip of the branch you are trying to check out. Remember, commits store files, but not in the normal way that the computer normally stores files. The Git-specific way that Git stores files allows names that Windows rejects. – torek Aug 13 '20 at 05:39

0 Answers0