Git worktrees are not new. They were introduced back in 2015 as part of Git version 2.5. For years, they stayed mostly under the radar, used by a small group of developers who understood their value.
Now they are suddenly everywhere.
In 2025 and 2026, worktrees have seen a strong resurgence. The reason is the way we write code is changing. With the rise of agent driven development and parallel workflows, worktrees have become a practical necessity.
What are Git worktrees
Normally, if you are inside one cloned repository and you switch branches, your whole working directory changes with it. That becomes annoying in situations like these:
- You are working on a feature, and suddenly need to fix a production bug on another branch
- You want to review a pull request locally without disturbing your current work
- You want to compare two branches side by side
- You need one directory for development and another for running tests or a local build on a different branch
Without worktrees, many developers solve this by cloning the same repository multiple times. That works, but it wastes disk space, duplicates setup, and creates extra maintenance. Worktrees give you multiple folders while still using the same underlying repository.
How it works
You keep your normal repository folder, then create extra folders attached to it. Each folder can be on a different branch.
my-app/ # main worktree
my-app-feature-login/ # linked worktree
my-app-hotfix/ # linked worktree
Each one is a real working directory, so you can open it in your editor, run builds there, and commit from there. Git keeps metadata so it knows all these directories belong to the same repository.
The main command is:
git worktree add <path>
For example, start in your main project:
git branch
* main
Now create a new worktree for a feature:
git worktree add ../app-feature-login -b feature/login
What happens here:
- a new folder ../app-feature-login is created
- a new branch feature/login is created
- that branch is checked out in the new folder
Now you have:
app/ # main branch
app-feature-login/ # feature/login branch
You can open both in your editor and have your coding agents work simultaneously without interrupting each other.