A Visual Studio extension that provides an intuitive interface for managing Git worktrees directly within the IDE.
| IDE | Marketplace | Description |
|---|---|---|
| Visual Studio | Git Worktree Manager | Extension for Visual Studio 2022 (17.14+) |
| JetBrains IDEs | Git Worktree Hub | Plugin for IntelliJ IDEA, Rider, WebStorm, and other JetBrains IDEs |
Access the Worktree Manager from the Extensions menu or View > Other Windows.
See all your Git worktrees in a clean, card-based layout. Each worktree displays:
- Intelligent path shortening for easy identification
- Current branch name
- Latest commit SHA
- Status badges (CURRENT, MAIN, LOCKED)
When you have multiple worktrees, the extension automatically shows the shortest unique path for each worktree, making it easy to identify them at a glance even when they share common parent directories.
Get real-time insights into each worktree without switching branches:
- Modified files: Count of changed and staged files.
- Untracked files: Count of new files not yet tracked by Git.
- Sync Status: See exactly how many commits you are ahead or behind from upstream.
- Local Only: Clearly indicates worktrees with no upstream tracking branch.
- Non-blocking: Status is fetched asynchronously in the background so the UI stays snappy.
Easily create new worktrees with the Add dialog:
- Create a new branch or use an existing one
- Choose the base branch for new branches
- Auto-generated worktree path based on branch name
- Option to open the new worktree in VS immediately after creation
Quickly find worktrees using the search box. Filter by:
- Folder name
- Branch name
- Full path
Each worktree card provides quick action buttons:
| Action | Description |
|---|---|
| Open in VS | Opens the worktree in a new Visual Studio instance (supports .sln and .slnx solutions) |
| Explorer | Opens the worktree folder in Windows File Explorer |
| Copy Path | Copies the full path to clipboard |
| Remove | Removes the worktree (includes Force Remove for dirty worktrees) |
- Force Remove: Safely remove worktrees even with uncommitted changes using a confirmation safety dialog.
- Protected Worktrees: Cannot remove the currently open worktree or the main worktree.
- Locked State: Detects and displays locked worktrees with reasons.
- Smart Enrichment: Intelligent status fetching with timeouts to prevent hanging on large repositories.
- Error Handling: Handles partial failures gracefully (e.g., git reference removed but folder locked).
- Visual Studio 2022 (17.14 or later)
- Git installed and available in PATH
Git Worktree Manager runs Git commands on Windows with process-scoped core.longpaths=true so worktree creation can handle repositories with long paths without changing your global Git configuration.
If you also see "filename too long" from Git in a terminal or another tool, enable Git for Windows long path support globally:
git config --global core.longpaths trueSee the Git for Windows long paths note for background.
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Requires the .NET 10 SDK version pinned in global.json.
# Clone the repository
git clone https://github.com/iAmBipinPaul/GitWorktreeManager.git
# Open in Visual Studio
start GitWorktreeManager.sln
# Build
dotnet build
# Run tests
dotnet testGitWorktreeManager/- Main VS extension projectGitWorktreeManager.Core/- Core library (Git operations, models)GitWorktreeManager.Tests/- Unit tests
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with VisualStudio.Extensibility
- Icons from Visual Studio Image Library







