git别名


查看别名列表

user@DESKTOP-K146JU9 path/to/world
> git config --get-regexp alias
alias.st status
alias.ck checkout
alias.br branch
alias.alias config --global --list
alias.pl pull
alias.p push
alias.del restore --staged
alias.brv branch --v
alias.lp log -p
alias.bd branch -D
alias.ls log --stat
alias.logg log --graph --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative --show-signature
alias.ma merge --abort
alias.m merge --no-ff
alias.sst status
alias.cg config --global
alias.crm reset HEAD~1
alias.rb rebase -i HEAD~1
alias.maa reset --merge
alias.ca commit --amend

修改别名

user@DESKTOP-K146JU9 path/to/world
> git config --global alias.cm "commit -am"

user@DESKTOP-K146JU9 path/to/world
> git config --get-regexp alias
alias.st status
alias.ck checkout
alias.br branch
alias.cm commit -am
alias.alias config --global --list
alias.pl pull
alias.p push
alias.del restore --staged
alias.brv branch --v
alias.lp log -p
alias.bd branch -D
alias.ls log --stat
alias.logg log --graph --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative --show-signature
alias.ma merge --abort
alias.m merge --no-ff
alias.sst status
alias.cg config --global
alias.crm reset HEAD~1
alias.rb rebase -i HEAD~1
alias.maa reset --merge
alias.ca commit --amend

参考文档


Author: Itaken
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source Itaken !
  TOC目录