Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aimuz/git-user
Git Multiple Identity Manager, Automatic identity switching according to the warehouse, personal and work isolation
https://github.com/aimuz/git-user
git gituser golang multiple-identity-manager zsh
Last synced: about 1 month ago
JSON representation
Git Multiple Identity Manager, Automatic identity switching according to the warehouse, personal and work isolation
- Host: GitHub
- URL: https://github.com/aimuz/git-user
- Owner: aimuz
- Created: 2020-10-19T08:15:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T08:42:16.000Z (about 2 years ago)
- Last Synced: 2024-11-24T17:56:18.101Z (2 months ago)
- Topics: git, gituser, golang, multiple-identity-manager, zsh
- Language: Go
- Homepage:
- Size: 60.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-user[beta]
> Switching identities on Git is easy, but the trouble is that different repositories may need different identities to commit and pull.
git multi user management
## Install
Users with go environment
```zsh
go install github.com/aimuz/git-user/cmd/git-user
```Verify installation
```zsh
git user -v
```## Usage
```zsh
git user
``````text
git multi user managementUsage:
git user [command] [flags]
git user [command]Examples:
git user create --title example --user example --email [email protected]
git user create --title example --user example --email [email protected] -i ~/.ssh/id_rsa
git user list
git user use exampleCommands:
git user clean Clean current repo username and email configuration
git user create create a new git user
git user help Help about any command
git user list list all git users
git user use Switch the current repo git userFlags:
--data string (default "/Users/aimuz/.config/git-user/user.yaml")
-h, --help help for user
-v, --version version for userUse "user [command] --help" for more information about a command.
```
### Create User
Help:
```zsh
$ git user create --help
Usage:
git user create [flags]Aliases:
create, aExamples:
git user create --title example --user example --email [email protected]
git user create --title example --user example --email [email protected] -i ~/.ssh/id_rsaFlags:
--email string git user email
-h, --help help for create
-i, --identity_file string The certificate corresponding to the user. If it is blank, the default value will be used
--title string if it is empty, username will be used
--user string git user nameGlobal Flags:
--data string (default "/Users/aimuz/.config/git-user/user.yaml")
``````zsh
$ git user create --title example --user example --email [email protected]
Successfully created example user
```### List All Users
```zsh
$ git user list
TITLE USER EMAIL IDENTITY FILE GPG KEY
example example [email protected]
```### Switch Current Repository User
`git user use [title]`
```zsh
$ git user use example
User set successfully
```## TODO
- [ ] AutoEnable
Automatically enable the specified account
- [x] GPG support
- [ ] SSH Identity