Search code examples
gitgitlabgit-clone

Git: Clone succeeded but checkout failed


When pulling the repo from gitlab i get the following error:
warning: Clone succeeded, but checkout failed. You can inspect what was checked out with 'git status' and retry with 'git restore --source=HEAD :/'

Running the command:
git restore --source=HEAD :/
produces:
-global is not a valid attribute name: .gitattributes:2 error: unable to create file [filename_redacted]: Filename too long

.gitattributes line 2 looks like this:
$ git config --global core.autocrlf true

When I edit it out of the .gitattributes, it auto-reappears.
When I issue git status I'm getting all the files from the repo as edited. Standard commands as git reset don't do any good either.
Is there anything I can do with this repo to make it work properly?
Should I ask the repo owner/someone who has it pulled and working to fix it before pulling it again? How?


Solution

  • Can I ask what OS are you using? If you have windows looks like it doesn't let you pass some filename formats:

    Found another post using git config --global core.symlinks false for a work around, hope it can work: Why is clone succeeded, but checkout failed?