Git User Switcher is a Visual Studio Code extension that allows you to easily switch between multiple Git user identities within your projects. With this extension, you can quickly toggle between different usernames, email addresses, and SSH keys associated with your Git repositories. It provides a
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
This Visual Studio Code extension allows you to easily switch between multiple Git users in your development environment.
Features
Switch between multiple Git users with a single click
Add and manage Git users with their respective usernames, email addresses, and SSH keys
Update existing Git users
Delete Git users
Getting Started
Install the Git User Switcher extension in Visual Studio Code.
Open the Command Palette (press Ctrl+Shift+P or Cmd+Shift+P on macOS) and search for Git User Switcher: Add Git User.
Enter the username, email address, and SSH key (optional) for the Git user you want to add.
Once added, you can see the current Git user in the status bar on the right side.
To switch between Git users, click on the status bar item (Git User: ) and select the desired user from the list.
To update a Git user, open the Command Palette and search for Git User Switcher: Update Git User. Select the user you want to update and enter the new details.
To delete a Git user, open the Command Palette and search for Git User Switcher: Delete Git User. Select the user you want to delete.
Switching Between Git Users
To switch between Git users, follow these steps:
Locate the status bar on the right side of the Visual Studio Code window.
Click on the status bar item displaying the current Git user (Git User: ).
A dropdown list will appear, showing all the saved Git usernames.
Select the desired Git user from the list.
The selected Git user will be activated, and their credentials will be used for Git operations.
Please note that switching Git users will affect the Git operations performed in the current workspace.
Configuration
The extension uses a configuration file (config.json) to store the Git users' information. You can find the file in the extension's installation directory.
Additional Notes
If no Git user is configured, the extension will try to use the current Git user obtained from the Git configuration.
The SSH key specified during user addition will be used for authentication when interacting with remote Git repositories.
Support
If you encounter any issues or have any suggestions or feedback, please feel free to open an issue on the GitHub repository.