Git RepositoriesA powerful VSCode extension for managing multiple Git repositories with support for worktrees, smart grouping, and workspace tracking. Features📁 Intelligent Repository OrganizationAutomatically organizes your Git repositories in a hierarchical tree view:
🎯 Current Workspace TrackingThe extension automatically highlights and expands the currently open workspace:
⚡ Quick NavigationFast repository and worktree switching:
🔍 Recursive ScanningAutomatically discovers Git repositories in configured paths:
🌲 Git Worktree SupportFull support for Git worktrees with detailed information:
Installation
Getting Started1. Configure Repository PathsOpen VSCode settings (
2. View Your Repositories
3. Navigate Quickly
Extension SettingsThis extension contributes the following settings:
|
| Command | Keybinding | Description |
|---|---|---|
Git Repositories: Refresh |
- | Rescan all configured paths for repositories |
Git Repositories: Quick Open |
Cmd/Ctrl+Alt+P |
Show quick picker for fast repository/worktree navigation |
Tree View Structure
📁 github.com (domain)
├─ 📁 username (owner)
│ └─ 📦 simple-repo (repository - single worktree)
├─ 📁 org (owner)
│ ├─ 📦 direct-repo (repository)
│ └─ 📁 team (nested owner)
│ └─ 📦 project-name (repository)
│ ├─ 🌿 feature-branch (worktree)
│ └─ 🌿 bugfix-branch (worktree)
└─ 📁 another-user (owner)
└─ 📦 another-repo (repository)
📁 gitlab.com
└─ ...
📁 No Remote (local repositories without remotes)
└─ 📦 local-project
Visual Indicators:
- ✨ Highlighted icon - Currently open repository/worktree
- 📦 Repository icon - Main repository/worktree
- 🌿 Branch icon - Secondary worktrees
- 📁 Folder icon - Domain/owner groups
How It Works
Repository Scanning
- The extension reads paths from
git-repositories.pathsconfiguration - Recursively scans each path for directories containing
.gitfolders - Ignores paths matching patterns in
git-repositories.ignorePaths - Extracts repository metadata using
simple-git:- Remote URLs and names
- Current branch
- All worktrees with branch/commit information
- Stores discovered repositories in VSCode's global state
Tree Organization
- Domain Grouping: Repositories are grouped by their remote domain (extracted from first remote URL)
- Owner Hierarchy: Owner paths are split and organized hierarchically
- For example, a repository with remote URL
git@github.com:org/team/project.git:- Domain:
github.com - Owner path:
org/team - Repository:
project
- Domain:
- This creates:
github.com→org→team→project - Each path segment becomes a nested owner node
- For example, a repository with remote URL
- Local Group: Repositories without remotes are placed in a "No Remote" group
- Worktree Display: Secondary worktrees appear as children under their parent repository
Workspace Tracking
- Tracks the current workspace via
vscode.workspace.workspaceFolders[0] - Compares repository/worktree paths against current workspace path
- Updates icons and expansion state automatically
- Refreshes tree when workspace folders change
Requirements
- VSCode 1.108.1 or higher
- Git installed and available in PATH
Known Limitations
- Maximum scan depth: 10 directory levels
- Only the first remote URL is used for domain/owner grouping
- Submodules (where
.gitis a file, not a directory) are detected but treated as regular repositories - Worktree commit information requires read access to the worktree directory
Performance Tips
For Large Directory Trees
Add ignore patterns for large directories you don't need to scan:
{
"git-repositories.ignorePaths": [
"**/node_modules/**",
"**/.cache/**",
"**/venv/**",
"**/vendor/**"
]
}
For Many Repositories
The extension caches discovered repositories in VSCode's global state, so rescans only happen when:
- VSCode starts
- You manually trigger a refresh
- Configuration changes
Troubleshooting
No repositories appear
- Check configuration: Open Settings → Extensions → Git Repositories
- Verify paths exist: Ensure paths in
git-repositories.pathsare valid - Check permissions: Ensure you have read access to configured directories
- Manual refresh: Click the refresh button in the tree view
Repositories are missing
- Check depth: The scanner stops at 10 directory levels. Move repositories higher in the tree.
- Check ignore patterns: Ensure your repositories aren't matched by ignore patterns
- Check
.gitdirectory: Ensure repositories have a.gitdirectory (not submodules with.gitfile)
Performance issues
- Add ignore patterns: Exclude large directories like
node_modules, build outputs - Reduce scan paths: Only include directories that actually contain repositories
- Increase specificity: Use more specific paths instead of scanning entire home directory
Development
This extension is built with:
- TypeScript - Type-safe development
- simple-git - Git command execution
- minimatch - Glob pattern matching
- ESBuild - Fast bundling
- Mocha - Testing framework
For development setup and contribution guidelines, see AGENTS.md.
License
Feedback & Issues
Found a bug or have a feature request? Please open an issue on GitHub.