2 个版本
0.1.2 | 2021年4月30日 |
---|---|
0.1.1 | 2021年4月30日 |
#135 in #change
6MB
492 代码行
git-user
一种简单的更改 Git 仓库用户的方法。底层执行
git config user.name <name>
git config user.email <email>
安装
为了安装,只需运行以下命令
cargo install --force git-user
这将把 git-user 安装到您的 ~/.cargo/bin
(或 Windows:%USERPROFILE%\.cargo\bin
)。
请确保将 ~/.cargo/bin
(或 Windows:%USERPROFILE%\.cargo\bin
) 目录添加到您的 PATH 变量中。
命令
交互式
# Apply a profile to set the user for the local git repository
git-user
# Apply a profile to set the user for the local git repository
git-user apply
# Add a new user profile
git-user add
# Change a value in a profile (e. g. the email)
git-user set
# Remove a user profile
git-user remove
命令行界面
# Apply a profile to set the user for the local git repository
git-user apply <profile>
# Add a new user profile
git-user add <profile> <name> <email>
# Add a new user profile
# Email defaults to: <name>@users.noreply.github.com
git-user add <profile> <name>
# Add a new user profile
# Name defaults to: <profile>
# Email defaults to: <profile>@users.noreply.github.com
git-user add <profile>
# Remove a user profile
git-user remove <profile>
# Rename a profile
git-user set profile <profile-name> <new-profile-name>
# Change the name of a profile
git-user set name <profile> <name>
# Change the email of a profile
git-user set email <profile> <email>
# Removes all directories and files ever created by this application
git-user reset
# Show the current user of the local git repository
git-user current
# List all profiles
git-user list
# Print the file path where the profiles are stored and its contents
git-user file
# Help menu
git-user -h
帮助菜单
git-user 0.1.2
Linus789
USAGE:
git-user [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
add Add a new user profile
apply Apply a profile to set the user for the local git repository
current Show the current user of the local git repository
file Print the file path where the profiles are stored and its contents
help Prints this message or the help of the given subcommand(s)
list List all profiles
remove Remove a user profile
reset Removes all directories and files ever created by this application
set Set a new value in a profile (e. g. to change the email)
依赖项
~7–17MB
~224K SLoC