IT lexicon › Programming › git worktree

git worktree

Programming På svenska → Updated: 2026-05-24

Multiple checkouts of the same repo in different directories — without cloning twice. git worktree add ../hotfix release-1.2.

Shares .git directory ⇒ saves disk and bandwidth. Each worktree has its own branch checkout. Perfect when you need to fix a hotfix while you're in the middle of a long-running feature. Many editors (VS Code, JetBrains) handle worktrees natively.

← Back to the lexicon