Working with git repos where you can have multiple identities (like one for work, one for personal projects, etc.) can be painful. This extension automatically prompts you to set a local user.email, user.name, and any additional git config keys for each project you open in VS Code that doesn't have them configured yet.
Features
Prompts to set local git config when opening a project that has none configured.
Convenient selector of previously used configs, displayed as Name <email>.
Support for additional git config keys beyond user.email and user.name (e.g. core.autocrlf, commit.gpgsign).
Ability to ignore specific project roots so the extension won't prompt for them.
Multi-root workspace support — all folders are checked, with a folder picker in commands.
Commands
Command
Description
git-auto-set-config: Get Config
Show the current local git config for this project
git-auto-set-config: Set Config
Manually set the local git config for this project
git-auto-set-config: Ignore current project root
Stop prompting for this project
git-auto-set-config: Unignore current project root
Resume prompting for this project
Extension Settings
Setting
Description
Default
git-auto-set-config.configList
Saved git configs in format [{"user.email": "you@example.com", "user.name": "Your Name", "core.autocrlf": "true"}]. The extension writes to this automatically.
[]
git-auto-set-config.ignoreRootList
List of project roots where the extension should not prompt.
[]
git-auto-set-config.queryInterval
How often (in ms) the extension checks whether local git config is set.
5000
Release Notes
1.0.1
Fix: command IDs and configuration namespace corrected, restoring command palette integration and config persistence
Fix: pressing Escape during config input now silently cancels
Fix: polling no longer opens a second prompt while the user is already responding to one
Fix: all four commands now work correctly in multi-root workspaces
Improve: profile picker shows Name <email> labels; email field validates format inline