A CLI to expand the ability of git
.
cargo install gito
alias: gup
get the parent repo ssh url based on github relationship if there is and set it as upstream
remote
gito gup --remote-name [name] # default is `upstream`
manage git user.
it's very useful when you have a few git accounts, like one is work account and one is github account.
there're some sub-commands inspired by nrm, you can see the detail by running gito user -h
.
Here we give some example
gito user add github HomyeeKing [email protected]
gito user ls
you will see an output like
+--------+------------+----------------------+
| alias | name | email |
+--------+------------+----------------------+
| github | HomyeeKing | [email protected] |
+--------+------------+----------------------+
Similiarly, you can delete
and use
specific account by alias
as we may have different git account, sometimes we may forget to change account, so we have to run git rebase -i <commit>
to amend it.
so here based on the gito user
, you can amend by alias
, the workflow like:
git rebase -i <commit> # choose commit need to be edit
# notice that `github` is the alias we create before
gito ammend github
# equivalent to these two commands
# git commit --amend --author 'HomyeeKing <[email protected]>' --no-edit
#git rebase --continue #
git init with specific user info by alias
gito init github