Hands-on task
Keep only one directory in the working tree
In /root/repo the root contains README.md and three subdirectories with files: src/, docs/, tests/.
Configure sparse-checkout in cone mode so that only the src/ subdirectory remains in the working tree (the files at the repo root stay as well). The docs/ and tests/ directories should disappear from the working tree, but remain in history — that is, you can't delete them with a plain rm; the filtering must be done by sparse-checkout itself.
- git sparse-checkout
- cone mode
- partial checkout
- working tree