git alias

本文最后更新于:1 个月前

git alias

Let you use git more efficiently
add below config code to you .gitconfig file (~/.gitconfig)

1
2
3
4
5
6
7
8
9
10
[alias]
st=status
ci=commit
cia=commit --amend
co=checkout
br=branch
cl=clone
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim bold blue)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim bold blue)- %an%C(reset)' -10 --all
lg = !"git lg1"

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!