I am trying to clone a private repository facing this error
Cloning into 'C:\Users\username\folder\word-add-in'... remote: Enumerating objects: 6786, done.
remote: Counting objects: 100% (1672/1672), done.
remote: Compressing objects: 100% (462/462), done.
remote: Total 6786 (delta 1342), reused 1467 (delta 1205), pack-reused 5114
Receiving objects: 100% (6786/6786), 4.75 MiB | 614.00 KiB/s, done. Resolving deltas: 100% (5038/5038), done. error: invalid path 'assets/icon-128.png:Zone.Identifier' 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 :/'
this is git status fatal: not a git repository (or any of the parent directories): .git
After this I used git init
then again clone but still same error.
After git init
and cloning again now git status is this
On branch master No commits yet Untracked files: (use "git add ..." to include in what will be committed) word-add-in/ nothing added to commit but untracked files present (use "git add" to track)
I have some files with name like icon-128.png_Zone.Identifier
this image
I have files with names containing underscores instead of colons, the issue may not be directly related to those files. However, Git might be interpreting them as having colons due to some underlying issue.
To work around this problem, you can try to clone the repository with the core.protectNTFS
setting set to false, which should allow Git to handle the file names more gracefully on Windows:
git config --global core.protectNTFS false
Then, try cloning the repository again:
git clone https://github.com/name/name.git
this will skip files with name like icon-16.png_Zone.Identifier