-1

Git gives me this when I attempt to clone.

$ git clone --depth 1 "https://github.com/Ajatt-Tools/kitsunekko-mirror.git" Cloning into 'kitsunekko-mirror'... remote: Enumerating objects: 101147, done. remote: Counting objects: 100% (101147/101147), done. remote: Compressing objects: 100% (94534/94534), done. remote: Total 101147 (delta 6117), reused 100653 (delta 5991), pack-reused 0 Receiving objects: 100% (101147/101147), 1.11 GiB | 20.19 MiB/s, done. Resolving deltas: 100% (6117/6117), done. fatal: cannot create directory at 'subtitles/16bit Sensation: Another Layer': Invalid argument warning: Clone succeeded, but checkout failed. You can inspect what was checked out with 'git status' and retry with 'git restore --source=HEAD :/' 

After doing git status it gives me fatal: not a git repository (or any of the parent directories): .git

I tried changing a bunch of config settings like git config --system core.longpaths true or installing GIT-LFS. I also tried git config --global core.protectNTFS false but that didn't work either. Git version 2.45.0.windows.1

1

1 Answer 1

-1

Clone succeeded, but checkout failed.

As git told you, git successfully cloned the repository

But it fails at populating the working directory i.e. checkout.

The reason:

fatal: cannot create directory at 'subtitles/16bit Sensation: Another Layer'

Git can't create the folder because it contains a : which is not allowed in a folder name on Windows

forbidden characters

To be able to checkout, files, you should set this git settings:

git config --global core.protectNTFS false 

More details in this answer: https://stackoverflow.com/a/70090792/717372

Or you could use git sparse-checkout feature to exclude this folder from checkout: https://stackoverflow.com/a/26129711/717372

Sign up to request clarification or add additional context in comments.

4 Comments

The OP mentioned git config --global core.protectNTFS false
@phd I have not seen: good thing I have edited my answer to talk about sparse-checkout...
Please refrain from answering common duplicates. Instead, vote to close. If the proposed duplicate doesn't already have a variation of this answer, by all means post this there instead.
Thanks for posting! The sparse-checkout feature worked for me. stackoverflow.com/a/59515426/25077152

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.