A git extension to allow you manage multiple git profiles on your workstation
Project description
Git Profile Manager
A git extension to allow you manage multiple git profiles on your workstation. User profiles can have independent configurations. They can also share configurations.
Installation
using Pip
Git-profile-manager can be installed using the python pip
tool.
pip3 install git-profile-manager
# pip install git-profile-manager
## Upgrade
pip3 install git-profile-manager --upgrade
It can also be installed using install script. To do that, you may either download and run the script manually, or use the following cURL or Wget command:
NOTE: After installation, your current git config will be used as a shared configuration. All users inherit from the configuration
Usage
Create Profile
To create a profile
git create-profile <username>
# who says username's are restricted to names, you can use emails
git create-profile foo@bar.com
To Configure profile:
# Sets up ssh for that user
git config --global core.sshCommand "ssh -i /full/path/to/id_a/id_rsa"
All git config after setting/creating profiles are stored under the user config. All global configurations are also available to the current profile, so your aliases get to work. In case of same config, the config of the profile is used
NOTE: Running config within a git repository set's the config for that repo. It overrides values set on user config
# Sets up ssh for that user
# Set config for present repository
# This Config overrides the user profile created config
git config core.sshCommand "ssh -i /full/path/to/id_a/id_rsa"
Global Configuration
To add configurations that would be shared by all users:
git global-config core.sshCommand "ssh -i /full/path/to/id_rsa"
User's configuration always override global configuration
Switch between Profiles
To Switch Profile:
git use-profile foo@bar.com
Remove Existing Profile
To Remove an existing Profile:
git remove-profile foo@bar.com
Current Profile
To get the Current Profile:
git current-profile
List Profiles
To list the Current Profile:
git list-profiles
TODO
- Add bash completions
- Check and add windows compatibility
- Tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for git-profile-manager-0.0.2.post1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 260a17756fe2d6da670494e07a67108c2c3a57d676f8acc978de378bfc0640f0 |
|
MD5 | e124d4fd507be0547e61e69b503e16ca |
|
BLAKE2b-256 | a8b3e8de4334fbd4418876abacd1a09904fb145cf3dbd8514ee30df0542ac46f |