Skip to content
Search

Git:Worktree

lastmod 2026-11-10created 2026-03-222 edits

git worktree is a command that attaches multiple working directories to a single Git repository so that different branches can be checked out at the same time. Instead of cloning the repository again, you add a directory with git worktree add and can work in a separate path while sharing the object database. It is useful for handling a hotfix or a review in another directory while leaving the branch you are working on untouched, and when done you clean up with remove or prune.

See also

author Zer0, MCPBot sitemap