Git Config Manager
Ever wanted to use different username and email addresses for your commits at work and for your personal repositories? While it is easy to do using Key Features
UsageCreating the profilesOnce you install extension, click on 'Git Config Profiles' on the VSCode Status Bar and define few profiles.
Selecting the profileClick on the status bar and if you have profiles you will presented with a dialog as below.
Click
Setting the profile selected to the repoAuto selection of profileWhen the extension loads up, it looks up the local git config and tries to match it with the profiles defined. If it finds a match, it selects the profile automatically (new behaviour). This behavior can be disabled in settings.
Manual selection of profileIf auto selection of profile is disabled, the status bar will show a warning if the repository's username and email do not match any of the profiles, and you can select a profile manually (old behaviour). Once you select a profile, the status bar text changes to selected profile name [1 in image below].
If you want to apply the username and email defined in the selected profile to the current repository, click on profile name in the status bar (e.g
Once the repository's username and email are in sync, you will see warning color go away confirming that repository config is in sync with the profile selected.
Deleting a profileOpen the Command Palette and type Validating a profileWant to test if a profile is properly configured before applying it? Use the Validate Profile command:
The validation checks:
Results:
This is especially useful after creating or editing a profile to ensure everything works correctly. ConfigurationThe extension provides configuration options to customize your experience: Advanced Git Configuration (
|
| Scenario | Status Bar Display | Tooltip |
|---|---|---|
| No editors open | Shows git icon → "Git Config User Profiles → No Profile ?" (always mode) or hidden (git-repos-only mode) | ℹ️Open a file from a git repository |
| Non-file schemes (Output window, Settings, etc.) | Shows git icon → "Git Config User Profiles → No Profile ?" (always mode) or hidden (git-repos-only mode) | ℹ️Open a file from a git repository |
| Jupyter Notebooks (.ipynb) | Same as regular files - shows git profile information | Same as regular files - displays profile sync status |
| File in non-git folder | Shows git icon → "Git Config User Profiles → No Profile ?" (always mode) or hidden (git-repos-only mode) | ℹ️This does not seem to be a valid git repository |
| No profiles created | Shows repo name → "No Profile" with question mark icon and warning background | 📋No Profiles Created - No profiles have been created yet |
| Git repo, no profile selected | Shows repo name → "No Profile" with question mark icon and warning background | ⚠️No Profile Selected - No profile has been selected for this repository |
| Git repo, profile selected, in sync | Shows repo name → profile name with normal background (no icons) | ✅Profile Active: Profile Name - Your git config is in sync with this profile. Click to switch profiles |
| Git repo, profile selected, out of sync | Shows repo name → profile name with alert icon and warning background | ⚠️Git Config Out of Sync - Shows side-by-side comparison of differences (username, email, signing key). Click to apply the profile or update git config |
| Profile configuration error | Shows repo name → profile name with error icon and error background | ❌Profile Configuration Error - Selected profile is missing required information |
| Nested git repositories | Works correctly by detecting git root from file location | Each nested git repo can have its own profile selection |
| Extension status hidden | Use "Show Extension Status" command | ⚠️ Status bar is hidden when not in a git repository. Use "Show Extension Status" command to see why |
Checking Extension Status
If you're wondering why the status bar is not visible, or want to see detailed information about the extension's current state, use the "Git Config User Profiles: Show Status" command from the Command Palette.
To access it:
- Open the Command Palette (
Cmd+Shift+Pon macOS orCtrl+Shift+Pon Windows/Linux) - Type "Git Config User Profiles: Show Extension Status"
- Press Enter
Multi-root and Nested Repository Support
The extension fully supports complex workspace configurations:
- Parent folder with multiple git repos: Open a parent folder containing multiple nested git repositories, and the extension will detect the correct git repo based on which file you have open.
- Multi-root workspaces: Each workspace folder can have its own profile selection.
- Mono repositories: Works correctly in mono repos by traversing up to find the git root from the opened file's location.
All tooltips are kept minimal for quick readability. Click the status bar icon for detailed information and available actions.
Technical Details: How Profile Storage Works
Note: This section is for advanced users who want to understand the internals. Most users don't need to read this!
Profile Definitions Storage
- Where: User Settings (Global)
- Setting:
gitConfigUser.profiles - Shared with team: ❌ No
Your profiles (name, email, signing key) are stored in your global user settings, available across all workspaces but private to you.
Profile Selection Storage
- Where: User Settings (Global, keyed by workspace path)
- Setting:
gitConfigUser.workspaceProfileSelections - Shared with team: ❌ No
Your selections are stored in a map like this:
{
"gitConfigUser.workspaceProfileSelections": {
"/path/to/work-project": "work-profile-id",
"/path/to/personal-project": "personal-profile-id"
}
}
This allows workspace-specific selections while keeping them private to each developer.
Profile Selection Priority
When opening a workspace, the extension determines the profile in this order:
- User settings map (
workspaceProfileSelections) - Current storage location (v2.2.0+) - Auto-matching - If auto-select is enabled and no profile is selected, matches git config against profiles
- Legacy
.vscode/settings.jsonfile - Automatically migrated to user settings if found - Legacy workspace settings - Automatically migrated from old workspace-scoped settings
- Legacy global selected flag - Backwards compatibility with v1.x (deprecated)
Migration from v2.1.0 and Earlier
The extension automatically migrates old profile selections:
- ✅ Reads old selections from
.vscode/settings.jsonor workspace settings - ✅ Migrates to new user settings storage (
workspaceProfileSelections) - ✅ Cleans up old settings from
.vscode/settings.jsonand workspace settings - ✅ Works seamlessly - no user action needed!
- ✅ One-time migration happens transparently when you open a workspace
FAQ
Q: Why not store selections in .vscode/settings.json?
A: That file is often committed to git and shared with the team. Profile selections are personal (your email vs teammate's email).
Q: Can team members use different profiles for the same project?
A: Yes! Each person has their own private selections.
Q: Will selections sync across machines?
A: Profile definitions sync via VSCode Settings Sync. Selections are stored in user settings and will sync if you have Settings Sync enabled, allowing your profile selections to follow you across machines.
Star History
Issues and feature requests
If you find any bug or have any suggestion/feature request, please submit the issue in the GitHub repo.







