Reputation: 836
the OS of my computer is windows
, and file name in repo maybe invalid in windows, so I enable core.sparsecheckout
and edit .git/info/sparse-checkout
by hand to checkout specified directory, and it's worked well.
recently I updated git for windows
and followed this post. But the command git sparse-checkout init --cone
failed, and output error: invalid path '/path/of/invaild/filename'
.
So, could this command skip invalid filename by some special tricks? or it's just a bug that I should waiting for developers to fix it?
Upvotes: 2
Views: 630
Reputation: 21
We have the same problem. An older version of git (2.16.2) understands the sparse-checkout settings and, as you say, works well. The latest version of git (2.26.2) knows that the repo is using sparse-checkout, but when doing something like "git reset --hard", it still flags "invalid path" errors for, in my case, aux.c and aux.h.
One of my co-workers says "I tested 2.23, 2.22, 2.18 and they all fail. I started to feel crazy and retested that 2.14 works (it does). This issue has been in the Windows Git client since at least June 2018 according to the release dates in https://en.wikipedia.org/wiki/Git#Releases."
Upvotes: 2