Skip to main content

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.

Python 3 PyPI version Build Status License: MIT


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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git-profile-manager-0.0.2.post1.tar.gz (5.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page