A lightweight extension to easily manage Git worktrees inside Visual Studio. Create, switch, and work on multiple branches without leaving your IDE.
Git worktree lets you check out multiple branches from the same Git repository at the same time, each into its own folder. You can work on different versions or features side by side, no more constant switching and rebuilding.
Instead of juggling one branch at a time, worktrees give each branch its own clean workspace. It’s like having multiple clones, but without wasting disk space or resyncing the whole repo.
This extension brings that power straight into Visual Studio. No command-line. No hassle.
Visual Studio’s Git support doesn’t handle multi-branch workflows well. This extension fixes that.
- No need for a separate Git client just to manage worktrees (Visual Studio already handles most Git features).
- Other extensions (like Git Extensions) require installing their own Git client this doesn’t.
- You don’t even need Git installed on your PC this uses Visual Studio’s inbuilt Git.
- Create new worktrees for any branch
- Switch between worktrees smoothly
- Manage multiple branches side-by-side
Get it from the Visual Studio Marketplace, or build it from source.
Open a solution or folder with a Git repository. Note: this extension only works if there’s an active Git repo or solution open otherwise, it won’t show up.
After installation, two options appear under Git > Git Worktree:
- Create Worktree (
Ctrl+Shift+=
) - Manage Worktrees (
Ctrl+Shift+\\
)
-
Shows current repo
-
Choose branch from the dropdown
- You can also type to filter it will suggest relevant matches
- It lists all branches in the repo
- Branches with a "+" prefix already have a worktree
-
Set path for the new worktree
- By default, the path will be:
repo path/repo_name_worktree/branch_name
- Worktree name = branch name
- You can choose your own directory
- You can also set a default base directory in Settings (explained later)
- By default, the path will be:
-
Force create: overwrites existing/overlapping worktrees
-
Option to open the new worktree in a new Visual Studio window (only works if “Load” is enabled in settings)
-
Creates the worktree for the selected branch at the selected path
-
Shows current repo
-
Lists all created worktrees (with their paths)
-
Option to open the selected worktree in a new VS window
-
Open selected worktree
-
Force remove (even if there are uncommitted changes)
-
Prune dangling worktree references
- Sometimes when you delete a worktree manually, Git still holds a reference
- Pruning removes that, so Git allows creating worktree again for that branch
-
Remove selected worktree
All Git command executions performed by the extension are logged in Visual Studio’s Output pane (under Git Worktree), and key status updates also appear in the status bar at the bottom for quick feedback.
Accessible via Git > Settings > Source Control > Git Worktree
-
Default Worktree Directory:
- If empty, defaults to:
repo directory\repo_name_worktree\branch_name
- Otherwise, uses your custom directory
- If empty, defaults to:
-
Load:
- If True: opens new worktree in a new window after creation
- If False: it just creates the worktree but doesn’t open it Useful if you want to prepare worktrees but open them later
This keeps your multi-branch Git workflow clean and fully integrated without leaving Visual Studio.