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 pip:

pip 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.0.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.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: git_user_switch-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 79865ffd4c851b713229e564dd8506a830aa1c829b3bbfc5a15ff46b4ba82881
MD5 07d9379e2b4100d11bb31331410aaf67
BLAKE2b-256 63633a37fa510aea0e28566e0dc77bcccc503ed2291e7ec16a39333752664d7f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: git_user_switch-1.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f84fe891ba09e1a76ff0257008e89efd473ed65b83eea9c987a2fba9200d733a
MD5 49815079e23e7ad28dbb9338d43cfbd5
BLAKE2b-256 5af7f0b6ea6125db0280e20762b1a7d0b8e4d81e92785e4951d9bf4c421ac745

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