{
 "schema_version": 1,
 "generated": "2026-10-19",
 "id": "feder-cr-git-ai--sparse-checkout-for-short-lived-agent-tasks",
 "repo": "feder-cr/git-ai",
 "repo_url": "https://github.com/feder-cr/git-ai",
 "repo_slug": "feder-cr-git-ai",
 "title": "Give an agent only the folders it needs in a huge repo",
 "page_title": "How to give an agent only the folders it needs in a huge repo with git-ai",
 "summary": "Use graft sparse and graft clone to materialize just the paths a short task touches instead of a full clone.",
 "who": "Platform engineer whose agents each edit a few files in a large monorepo and waste time on full clones",
 "problem": "Cloning the whole repository for a task that touches three files makes each agent slow to start.",
 "outcome": "The agent fetches only the requested paths and can still land its change through the server.",
 "steps": [
  "Build with: make build",
  "Run ./_build/bin/graft to list the CLI commands",
  "Use graft sparse or graft clone with the paths <paths> the task needs",
  "Land the resulting change and confirm it appears in the changeset log"
 ],
 "agent_prompt": "Using feder-cr/git-ai, run ./_build/bin/graft to find the sparse and clone commands, then materialize only <paths> from <repo> and land one edit. Verify that unrelated directories were not downloaded.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "The README names graft clone and graft sparse but not their flags, so read the CLI help or docs before running them.",
 "category": "Software & DevOps",
 "tags": [
  "Software & DevOps"
 ],
 "lang": "go",
 "requirements": [
  "Linux or macOS",
  "Go 1.26, a C toolchain, Meson and Ninja (the build compiles a bundled Git)",
  "No paid keys needed; conflict resolution can use any LLM provider, a deterministic tool, or none",
  "SQLite or PostgreSQL plus object storage (file, S3, GCS, Azure) only if you move the repo state off local Git"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "best": false,
 "score": 0.476,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/feder-cr-git-ai/sparse-checkout-for-short-lived-agent-tasks/",
 "md": "https://dedupedai.com/use-cases/feder-cr-git-ai/sparse-checkout-for-short-lived-agent-tasks/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly."
}
