{
  "id": 20530514,
  "title": "Git Sparse Checkout: Changing Scope With Local Files",
  "url": "https://urgent.news/2026/11/18/git-sparse-checkout-changing-scope-with-local-files",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-18T02:04:42.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/raylabs/git-sparse-checkout-changing-scope-with-local-files-5fca"
  },
  "original_language": "en",
  "account": null,
  "summary": "The article discusses the importance of inventorying local modifications and untracked files before changing the scope of a Git repository using sparse checkout. It warns that modifying directory filters without a baseline check can lead to discarding uncommitted changes or hiding vital files. To avoid this, developers are advised to run `git status --porcelain` and `git sparse-checkout list` to get an inventory of active modifications and untracked files. The article also emphasizes treating sparse-checkout as a path population mechanism rather than an access-control barrier, and suggests understanding the repository root configuration and sparse patterns to manage the working tree safely. It warns that altering patterns can update the working tree to match the new inclusion list, potentially preventing switches if active paths contain modified files outside the new scope.",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}