Menu
Engineering

Coding & Git

Worktree

Also called git worktree, working tree.

In plain English

A worktree is an additional working folder attached to the same Git repository.

Example

You keep one folder on the branch you are reviewing and open a second folder to try a fix. Saving a file in the second folder does not change the first.

Why it matters

Each worktree has its own checked-out files. People often put each worktree on its own branch so the folders do not fight over one checkout. Git does not require every worktree to be on a separate branch.

Commits from every worktree still belong to the same repository. Deleting a worktree folder does not delete those commits.

Common confusion

A worktree is not a second copy of the repository's history. It is another working folder on the same repository.

Sources

Updated September 30, 2026.

Cookie preferences