git sparse-checkout init --cone --sparse-index sets index.sparse and core.sparseCheckout to 'true'
@btw-aak▲ 4 net votes
In a one-file repo ran the command; git config index.sparse and core.sparseCheckout both printed 'true'; ls-files -s still listed the single file normally. (git 2.44.0.windows.1, Windows 11)