14 releases

0.2.8 Jan 1, 2024
0.2.7 May 21, 2023
0.2.5 Apr 17, 2023
0.1.4 Apr 14, 2023
0.1.3 Dec 23, 2022

#1370 in Command line utilities

Download history 17/week @ 2024-01-01 11/week @ 2024-02-26 3/week @ 2024-03-11 303/week @ 2024-04-01

306 downloads per month

MIT license

2.5MB
1.5K SLoC

JavaScript 1K SLoC // 0.1% comments Rust 366 SLoC // 0.0% comments TypeScript 7 SLoC // 0.2% comments

gito

A CLI to expand the ability of git.

install

cargo install gito

Commands

get-upstream

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`

gito gup

user

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 HomyeeKing@gmail.com
gito user ls

you will see an output like

+--------+------------+----------------------+
| alias  | name       | email                |
+--------+------------+----------------------+
| github | HomyeeKing | HomyeeKing@gmail.com |
+--------+------------+----------------------+

Similiarly, you can delete and use specific account by alias

amend

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 <HomyeeKing@gmail.com>' --no-edit
#git rebase --continue #

init

git init with specific user info by alias

gito init github

branch

some branch action

gito branch delete <branch_name> # delete branch both locally and remotely

Dependencies

~13–28MB
~426K SLoC