git sparse checkout warning: unrecognized negative pattern

942 Views Asked by At

I have clone the full repo before. so I run the following command.

cd main
git sparse-checkout init --cone
echo -e '/*\n!/client/*' > .git/info/sparse-checkout
git checkout

then the output

warning: unrecognized negative pattern: '/client/*'
warning: disabling cone pattern matching
Updating files: 100% (429011/429011), done.

and the .git/info/sparse-checkout file:

/*
!/client/*

after checkout, the client dir is still there, I think it should not be there, where is something wrong? I read the blog https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout/ and didn't get it. Could someone explain it, Thanks!

0

There are 0 best solutions below