Skip to main content

Command-line tool for managing multiple git identities on the same machine

Project description

GitID

GitID is a command-line tool for managing multiple git identities on the same machine. This is particularly useful for shared machines where multiple people develop in the same workspaces, which is in some cases unavoidable.

With GitID, users can store their git identities and quickly load them in their shell, so their commits are marked with their name and email.

Note that GitID only sets commit authors and committers, and does not affect authorization.

Installation

Installation is easy:

pip install gitid
gitid init bash # change to your shell of choice

Unsupported shell

If your shell is unsupported by gitid init, simply add alias gitid="source gitid" to the appropriate startup file of your shell.

Workflow

Suppose both Frodo Baggins and Samwise Gamgee want to develop on the same computer. They would add their git identities like so:

gitid add frodo "Frodo Baggins" frodo@shire.com
gitid add sam "Samwise Gamgee" sam@shire.com

Now Frodo wants to write some code:

gitid set frodo
... git commands ...
git commit # This commit is marked with "Frodo Baggins <frodo@shire.com>" as the committer and author

Separately, possibly at the same time (in a different session), Samwise also wants to write code:

gitid set sam
... git commands ...
git commit # This commit is marked with "Samwise Gamgee <sam@shire.com>" as the committer and author

All identities can be viewed:

gitid list

Which outputs: (* marks the active identity)

Stored identities:
    ( ) frodo: Frodo Baggins <frodo@shire.com>
    (*) sam: Samwise Gamgee <sam@shire.com>

Identities can also be removed:

gitid remove frodo # removes Frodo's identity
gitid clear # removes all stored identities

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

gitid-0.2.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

gitid-0.2.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file gitid-0.2.1.tar.gz.

File metadata

  • Download URL: gitid-0.2.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for gitid-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9d8ba09f4413344d02f5c78d331e80064f6a4698bcccc479fcdd651628700642
MD5 c734deb3bc935f445d6d825cc6cffd1e
BLAKE2b-256 c1206ca217fcb5290a3d5f9bd0f93b1f1ba88c49d522b4e6605a14a3d08a12c5

See more details on using hashes here.

Provenance

File details

Details for the file gitid-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: gitid-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for gitid-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31fe1cb2656c7ae0dc885254f30b94036c33841bf273a7295df27bb1dde0ffef
MD5 1db46a9d5611a5ebdff193a4141da1c4
BLAKE2b-256 394b53602e9a88f68086de8ed57c85347d56699e1a961c58c115c5b15f537af5

See more details on using hashes here.

Provenance

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