Crates.io | change-git-user |
lib.rs | change-git-user |
version | 1.2.3 |
source | src |
created_at | 2020-11-24 16:26:24.19523 |
updated_at | 2021-10-18 18:45:16.563085 |
description | Manage multiple git configurations |
homepage | |
repository | https://github.com/spenserblack/change-git-user |
max_upload_size | |
id | 315866 |
size | 36,849 |
cgu
Manage multiple git configurations
Inspired by Git-User-Switch.
# this will install the executable `cgu` and `git-change-user`
cargo install change-git-user
# enable only the cli
cargo install --no-default-features --features=cli change-git-user
# enable only prompts
cargo install --no-default-features --features=prompts change-git-user
user.name
and user.email
configuser.signingKey
to the configgit2
to discover a repository and manipulate its configNOTE You can use cgu
and git change-user
interchangeably.
# This will spawn prompts to guide you through managing user configurations
cgu
If you don't want use use prompts, you can use subcommands instead. The subcommands are:
add
select
delete
view
# view CLI options
cgu --help
# view subcommand help
cgu <subcommand> --help
# Add a config with the name "My Config"
# Defaults to the user.name value ("My Name" in this example) if --name is not passed
cgu add --name "My Config" "My Name" example@email.com
# View all configs
cgu view --all
# Select the new config
cgu select "My Config"
# Delete the new config
cgu delete "My Config"