Skip to main content

gitu

Account manager for git users with multiple accounts.

Install

Install gitu from PyPi:

pip install gitu

Usage

usage: gitu [-h] {login,l,add,a,view,v,edit,e,remove,r} ...

positional arguments:
  {login,l,add,a,view,v,edit,e,remove,r}
    login (l)           switch users
    add (a)             add a new user
    view (v)            view information of users
    edit (e)            edit the information of a user
    remove (r)          remove a user

optional arguments:
  -h, --help            show this help message and exit

Add a user

Usage

usage: gitu add [-h] [-r] [-a ALIAS] [-g] name email

positional arguments:
  name                  name of the user
  email                 email of the user

optional arguments:
  -h, --help            show this help message and exit
  -r, --replace         replace the user if the name or alias already exists
  -a ALIAS, --alias ALIAS
                        add a alias to the user
  -g, --gpgsign         set commit.gpgsign to true

Example

# Add a new user Misaka
gitu add Misaka misaka@example.com
# Add a new user Shirai with alias Kuroko
gitu a -a Kuroko Shirai shirai@example.com

Switch users

Usage

usage: gitu login [-h] [--local] [-g] [-s] [-w] name

positional arguments:
  name            name or alias of the user

optional arguments:
  -h, --help      show this help message and exit
  --local         write to or read from the repository .git/config file
                  (default)
  -g, --global    write to or read from global ~/.gitconfig file
  -s, --system    write to or read from system-wide $(prefix)/etc/gitconfig
  -w, --worktree  write to or read from .git/config.worktree if
                  extensions.worktreeConfig is present

Example

# Login as Misaka
gitu login Misaka
# Login as Shirai Kuroko globally
gitu l -g Kuroko

View users

Usage

usage: gitu view [-h] [--local] [-g] [-s] [-w] [-l] [-a]

optional arguments:
  -h, --help      show this help message and exit
  --local         write to or read from the repository .git/config file
                  (default)
  -g, --global    write to or read from global ~/.gitconfig file
  -s, --system    write to or read from system-wide $(prefix)/etc/gitconfig
  -w, --worktree  write to or read from .git/config.worktree if
                  extensions.worktreeConfig is present
  -l, --list      list all users
  -a, --all       show all information of users

Example

# View local user
gitu view
# View global user
gitu v -g
# List all users
gitu v -l
# List all users in details
gitu v -la

Edit a user

Usage

usage: gitu edit [-h] [-n NEW_NAME] [-e EMAIL] [-a ALIAS]
                     [--remove-alias ALIAS] [-g] [-r]
                     name

positional arguments:
  name                  name or alias of the user

optional arguments:
  -h, --help            show this help message and exit
  -n NEW_NAME, --name NEW_NAME
                        new name of the user
  -e EMAIL, --email EMAIL
                        new email of the user
  -a ALIAS, --alias ALIAS
                        add a new alias to the user
  --remove-alias ALIAS  remove the alias of the user
  -g, --gpgsign         set commit.gpgsign to true
  -r, --replace         replace the user if the name or alias already exists

Example

# Rename Misaka to Mikoto
gitu edit Misaka -n Mikoto
# Change Email
gitu e Shirai -e shirai@gakuen-toshi.tech
# Add alias
gitu e -a Onee-sama Mikoto
# Remove alias
gitu e --remove-alias Onee-sama Mikoto

Remove a user

Usage

usage: gitu remove [-h] name

positional arguments:
  name        name or alias of the user

optional arguments:
  -h, --help  show this help message and exit

Example

# Remove a user
gitu remove Kamijou

Exit status

The status is one of the follows:

  • 0 (SUCCESS): the operation succeeded.
  • 1 (USER_NOT_FOUND): the user does not exist.
  • 2 (USER_EXISTS): the user already exists. To replace the user, use -r/--replace.
  • 3 (GIT_ERROR): failed to execute a git command.

Metadata

Release files for gitu 0.1.0

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

Source distribution (sdist)

Source distribution for gitu 0.1.0
File Size Uploaded Provenance Actions
gitu-0.1.0.tar.gz 5.5 kB Without provenance Details for gitu-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gitu 0.1.0
File Interpreter ABI Platform Actions
gitu-0.1.0-py3-none-any.whl Python 3 none any Details for gitu-0.1.0-py3-none-any.whl

Total release size: 12.7 kB

Release files / gitu-0.1.0.tar.gz

Download URL gitu-0.1.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d7ec320928819444138bc024623fb28805514adf9685a41b1c007da88ac9e423
BLAKE2b-256 checksum
How to use checksums
3c4a376730b3fb76985f531ad9f5f753ca166a1b39244101d8fd62c823f501e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.1

Release files / gitu-0.1.0-py3-none-any.whl

Download URL gitu-0.1.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
943bfc9ea5adf3146bfb4c1f0e7401a2a6d22537414389f1e2777033eb06c7d2
BLAKE2b-256 checksum
How to use checksums
b48214ece51f8012ee2a3496481d0a09ab3156ff5623a1d4f6d8c084882de330
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.1

Security for gitu 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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