Skip to main content

A CLI tool to switch Git user profiles.

Project description

Git User Switch

A CLI tool to switch Git user profiles easily.

Installation

Install the package using pipx:

pipx install git-user-switch

Configuration

Set the GIT_USER_SWITCH_CONFIG environment variable to the path of your configuration file

export GIT_USER_SWITCH_CONFIG="/Users/user/config.json"

The configuration file should look like this

{
    "user1": {
        "ssh_key": "~/.ssh/id_rsa_user1",
        "git_name": "user-1",
        "git_email": "user1@example.com"
    },
    "user2": {
        "ssh_key": "~/.ssh/id_rsa_user2",
        "git_name": "user-2",
        "git_email": "user2@example.com"
    }
}

Usage

git-user-switch user1

Try adding it to your zshrc or bashrc file and use it.

export GIT_USER_SWITCH_CONFIG="/Users/user/config.json"
git-user-switch user1

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_user_switch-1.0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_user_switch-1.0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file git_user_switch-1.0.1.tar.gz.

File metadata

  • Download URL: git_user_switch-1.0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for git_user_switch-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9fbcac68a3769fac5be2c76e7354f8cfad17dc3589a3df68c69cad412a656ac9
MD5 08c025d31201bc85ca63cce2f8d5c284
BLAKE2b-256 13b67a785187d27017f19978cabebe60f8b0d6a2e599458eda4381e38e2b5952

See more details on using hashes here.

File details

Details for the file git_user_switch-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: git_user_switch-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for git_user_switch-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 50265a04514397eb256aa04e7a6770758641bfd6db05078f1763b4671858ba1f
MD5 c84694534a3d1840d8c7f4f02a7ec7ec
BLAKE2b-256 8a91ee59eb5f3a853e36b1a9856c731d66daf524d0dd2b41c81e25ce91590d42

See more details on using hashes here.

Supported by

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