本文最后更新于:1 个月前
git alias
Let you use git more efficiently
add below config code to you .gitconfig file (~/.gitconfig)
| [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"
|