The docs for git sparse-checkout
state,
By default, when running git sparse-checkout init, the root directory is added as a parent pattern. At this point, the sparse-checkout file contains the following patterns:
/* !/*/
However, I do not want to include the root in sparse-checkout
I want something like,
/directory_i_want
!/*
!/*/
But that doesn't work, returning instead
warning: unrecognized pattern:
/*
warning: disabling cone pattern matching
Such that the sparse-checkout only pulls the one directory at the top, and not ever file in the repository's root. How can I achieve this?