alexiszamanidis/vscode-git-worktrees
alexiszamanidis/vscode-git-worktrees has 77 GitHub stars and 8 forks. GitHot measured 0 stars in 24 hours and +1 in 7 days. Last checked 2026-11-15 07:01 UTC. Last push 2026-10-17.
Measured star growth
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
A VS Code extension that wraps git worktree operations for simplicity and productivity
Developer ToolsREADME.md
Original🧩 VS Code Git Worktrees
A wrapper for Git Worktree operations that provides an interactive API so developers can manage worktrees more easily — without switching between the terminal and VS Code.
🎯 Purpose of the Extension
After creating a ZSH plugin for Git operations, I noticed how often I switched between the terminal and my main editor (VS Code). To streamline my workflow, I built this extension to keep everything inside VS Code.
⚙️ Requirements
- Git ≥ 2.34.1
🧪 Multiple Workspaces Support
This extension supports multiple workspaces. Here's how it works:
- If you have more than one project open, you'll be prompted to choose the workspace to run the operation in.
- If only one project is open, it is automatically selected.
✅ Select a workspace from the list → the operation will run in that workspace.
🛠️ Supported Operations
➕ git worktree add [remote-branch] [new-branch]
Create a new worktree.
Behavior:
- If you skip the new branch name (
ESC), it defaults to using the same name as the remote branch. - Since worktree and branch names are often identical, the extension validates user input accordingly. 👉 See Issue #22
📄 git worktree list
Display all worktrees and switch between them easily via an interactive UI.
❌ git worktree remove [worktree-name]
Remove an existing worktree.
Behavior:
- If untracked or modified files exist, a ⚠️ popup will appear in the bottom right.
- You can force delete by clicking the
Force deletebutton in that popup.
Restrictions:
- You cannot delete the worktree you're currently working in.
🚀 Getting Started
- 📦 Install the Git Worktrees extension from the VS Code Marketplace.
- 💡 Open the command palette:
Ctrl + Shift + P - 🔍 Search for any available operations
All commands are prefixed with:
Git Worktree:
✨ Features & Operations
➕ Worktree Add (Create)
Create a new Git worktree with an intuitive interface.

🔁 Worktree List (Switch)
View and switch between all active worktrees with ease.

❌ Worktree Remove
Safely remove a worktree. If files are untracked or modified, you’ll get a prompt to confirm.

⚠️ Error Handling
If something goes wrong, a helpful popup will appear at the bottom-right corner of your screen. Please don’t hesitate to open an issue if you encounter a bug.

⚙️ Extension Settings
Customize behavior using the following properties in your VS Code settings:
| 🏷️ Property | 🧩 Type | 🛠️ Default | 📃 Description |
|---|---|---|---|
vsCodeGitWorktrees.remove.stalledBranches |
boolean |
false |
Remove local (stalled) branches that no longer exist on the remote |
vsCodeGitWorktrees.move.openNewVscodeWindow |
boolean |
true |
Open a new VS Code window when switching or creating a worktree |
vsCodeGitWorktrees.move.preserveSubfolder |
boolean |
true |
When switching or creating a worktree, open the same relative subfolder you were in (e.g. a monorepo package). Falls back to the worktree root if missing |
vsCodeGitWorktrees.worktrees.dir.path |
string |
null |
Directory where new worktrees are created as {dir}/{branch}, e.g. ${userHome}/worktrees. If unset, worktrees are created as siblings of the main repo |
vsCodeGitWorktrees.add.autoPush |
boolean |
true |
Automatically push the new worktree branch after creation |
vsCodeGitWorktrees.add.autoPull |
boolean |
true |
Automatically pull updates after creating a new worktree branch |
vsCodeGitWorktrees.worktreeCopyIncludePatterns |
array |
[] |
Files and folders to copy from the source repo to the new worktree, e.g. [".venv", "docs/tmp"] |
vsCodeGitWorktrees.worktreeCopyExcludePatterns |
array |
[] |
Files and folders to exclude from the worktree copy, e.g. ["tmp", "target"] |
vsCodeGitWorktrees.worktree.coloring |
boolean |
false |
Enable color labels when creating or switching worktrees |
vsCodeGitWorktrees.worktreeSearchPath |
string |
null |
Optional subdirectory (relative or absolute) where Git repositories can be found if the root workspace is not a Git repository, e.g. ${userHome}/worktrees |
Contributing
We welcome all contributions, issues and feature requests, whether small or large. If you want to contribute, feel free to check out our issues page and our guidelines.