{"slug": "git-worktree", "name": "Git worktree", "category": "git", "category_name": "Git and code hosting", "description": "", "recommenders": 3, "commenters": 4, "warners": 1, "score": 1.796, "rising": 1.67, "first": "2026-01-25", "latest": "2026-08-24", "why": "the paradigmatic example where git worktree is useful", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 3, "neutral": 0, "compare": 0, "warn": 1}, "spark": [0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "the paradigmatic example where git worktree is useful", "icon": true, "domain": null, "github_repo": null, "official_url": "https://git-scm.com/docs/git-worktree", "pricing": "", "aliases": ["Git worktree", "git worktree"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 790653792, "item_id": 49415862, "url": "https://news.ycombinator.com/item?id=49415862", "by": "mkirsten", "date": "2026-08-24", "stance": "recommend", "quote": "Prior to AI, I never used worktrees. Now I use them all the time.", "excerpt": "My mind inserted an 'of' in the title. I thought the article was about doing parallel development without using Git worktrees. Prior to AI, I never used worktrees. Now I use them all the time. I think it's both due to that AI agents are well suited to do parallel development, but also due to that Claude helps me avoiding the headaches of using Git worktrees", "context": "", "use_case": "parallel AI agent development", "switched_from": "", "story": "Parallel development without the headaches using Git worktree"}, {"id": 790629041, "item_id": 49414315, "url": "https://news.ycombinator.com/item?id=49414315", "by": "irskep", "date": "2026-08-24", "stance": "recommend", "quote": "I use git worktrees daily.", "excerpt": "I use git worktrees daily. I'm surprised by how hard it can be to explain them to people who have never used them. Lately I've settled on \"like clones, but sharing a .git directory.\" The article tries to get this across by comparing them to branches, but I think clones are a more intuitive concept to compare against. To solve some of the ergonomics issues (command verbosity, manual commands to copy over .env files an", "context": "", "use_case": "switching between tasks", "switched_from": "git checkout", "story": "Parallel development without the headaches using Git worktree"}, {"id": 748199952, "item_id": 46762497, "url": "https://news.ycombinator.com/item?id=46762497", "by": "zephen", "date": "2026-01-25", "stance": "recommend", "quote": "the paradigmatic example where git worktree is useful", "excerpt": "An interesting technique. The problems discussed by both Simon and Paul where the browser can absolutely trash any directory you give it is perhaps the paradigmatic example where git worktree is useful. Because you can check out the branch for the browser/AI agent into a worktree, and the only file there that halfway matters is the single file in .git which explains where the worktree comes from. It's really easy to ", "context": "", "use_case": "sandboxing AI agents and browsers", "switched_from": "", "story": "The Browser Is the Sandbox"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 790640080, "item_id": 49415005, "url": "https://news.ycombinator.com/item?id=49415005", "by": "pkghost", "date": "2026-08-24", "stance": "warn", "quote": "I am giving up in favor of multiple checkouts to enable many agents to work across many repos.", "excerpt": "Having gone down the worktree rabbit hole for a month or so, I am giving up in favor of multiple checkouts to enable many agents to work across many repos. Worktrees worked great for me when my agents' work was mostly contained to a single repo (they got me to finally hitting rate limits, not that that was a goal). As my homelab scales, agents increasingly work across multiple repos, and that's where (my approach to)", "context": "homelab with many repos", "use_case": "parallel agent work", "switched_from": "", "story": "Parallel development without the headaches using Git worktree"}]}], "who": [], "tags": [], "use_cases": ["parallel ai agent development", "parallel agent work", "switching between tasks", "sandboxing ai agents and browsers"], "compared": [], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=49413093", "title": "Parallel development without the headaches using Git worktree", "mentions": 3}, {"url": "https://news.ycombinator.com/item?id=46762150", "title": "The Browser Is the Sandbox", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {}, "2026-01": {"recommend": 1}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {}, "2026-07": {}, "2026-08": {"recommend": 2, "warn": 1}, "2026-09": {}, "2026-10": {}}, "quotes": [{"id": 790653792, "item_id": 49415862, "url": "https://news.ycombinator.com/item?id=49415862", "by": "mkirsten", "date": "2026-08-24", "stance": "recommend", "quote": "Prior to AI, I never used worktrees. Now I use them all the time.", "excerpt": "My mind inserted an 'of' in the title. I thought the article was about doing parallel development without using Git worktrees. Prior to AI, I never used worktrees. Now I use them all the time. I think it's both due to that AI agents are well suited to do parallel development, but also due to that Claude helps me avoiding the headaches of using Git worktrees", "context": "", "use_case": "parallel AI agent development", "switched_from": "", "story": "Parallel development without the headaches using Git worktree"}, {"id": 790640080, "item_id": 49415005, "url": "https://news.ycombinator.com/item?id=49415005", "by": "pkghost", "date": "2026-08-24", "stance": "warn", "quote": "I am giving up in favor of multiple checkouts to enable many agents to work across many repos.", "excerpt": "Having gone down the worktree rabbit hole for a month or so, I am giving up in favor of multiple checkouts to enable many agents to work across many repos. Worktrees worked great for me when my agents' work was mostly contained to a single repo (they got me to finally hitting rate limits, not that that was a goal). As my homelab scales, agents increasingly work across multiple repos, and that's where (my approach to)", "context": "homelab with many repos", "use_case": "parallel agent work", "switched_from": "", "story": "Parallel development without the headaches using Git worktree"}, {"id": 790629041, "item_id": 49414315, "url": "https://news.ycombinator.com/item?id=49414315", "by": "irskep", "date": "2026-08-24", "stance": "recommend", "quote": "I use git worktrees daily.", "excerpt": "I use git worktrees daily. I'm surprised by how hard it can be to explain them to people who have never used them. Lately I've settled on \"like clones, but sharing a .git directory.\" The article tries to get this across by comparing them to branches, but I think clones are a more intuitive concept to compare against. To solve some of the ergonomics issues (command verbosity, manual commands to copy over .env files an", "context": "", "use_case": "switching between tasks", "switched_from": "git checkout", "story": "Parallel development without the headaches using Git worktree"}, {"id": 748199952, "item_id": 46762497, "url": "https://news.ycombinator.com/item?id=46762497", "by": "zephen", "date": "2026-01-25", "stance": "recommend", "quote": "the paradigmatic example where git worktree is useful", "excerpt": "An interesting technique. The problems discussed by both Simon and Paul where the browser can absolutely trash any directory you give it is perhaps the paradigmatic example where git worktree is useful. Because you can check out the branch for the browser/AI agent into a worktree, and the only file there that halfway matters is the single file in .git which explains where the worktree comes from. It's really easy to ", "context": "", "use_case": "sandboxing AI agents and browsers", "switched_from": "", "story": "The Browser Is the Sandbox"}]}