0

I have a repo with 3 subfolders: A, B, C

I do a checkout with A/ and B/ in sparse_checkout.

Now I want to remove B from my sparse view. How?

If I just rm -r B, or git rm -r B, or git rm -r --cached B then git wants to commit that removal to the repo. But I want to keep B in the repo, just do not want to keep it in my working dir.

user2583621
  • 165
  • 12
  • Official doc suggests you can change $GIT_DIR/info/sparse-chec and the changes should be reflected on the next checkout. Is this not happening? https://git-scm.com/docs/git-read-tree – sbat Oct 04 '19 at 16:32
  • Removing B/ from sparse_checkout does not remove the directory from the working copy. After the next checkout it is still there. And removing it from the working copy results in the removal from repo with the next commit. – user2583621 Oct 04 '19 at 20:42

0 Answers0