Skip to main content

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

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 

  git create-profile -e foo@bar.com -n "Foo Bar"

To Configure profile:

  # Sets up ssh for that user
  git config --global core.sshCommand "ssh -i /full/path/to/id_a/id_rsa"

NOTE: Git Profile Manager stores the user config as global config. Hence all configurations must carry the --global flag. That means running config without the --global flag creates a local config that 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 value for core.sshCommand
  git config core.sshCommand "ssh -i /full/path/to/id_a/id_rsa"

All initial global configurations are added to the user config. For conflicts, the user's config override the global config.

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

Apply profile

Applies a profile to a particular directory. Once applied, any repository within the directory uses the config.

  # Applies current user profile 
  git apply-profile /home/user/company

  # Applies specified user profile
  git apply-profile /home/user/personal -u personal

implemented using https://git-scm.com/docs/git-config#_conditional_includes

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

Release files for git-profile-manager 0.0.4.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-profile-manager 0.0.4.post1
File Size Uploaded
git-profile-manager-0.0.4.post1.tar.gz 7.2 kB Details

Release files / git-profile-manager-0.0.4.post1.tar.gz

Download URL git-profile-manager-0.0.4.post1.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4466c0666b87a9e610ed7b00e725e14cf7e0b7f13a229ed253e0d76cc59977bf
BLAKE2b-256 checksum
How to use checksums
ca3af0441341e547b57e250dc5b8f84d776ad4781f02e5f5a0a2ec3f3afb05f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.0.4.post1 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page