给命令设置简短的别名能够帮助咱们节省大量时间,并且能够防止因经常敲错命令引发的心情浮躁。啥也不说了,直接贴配置:git
git config --global alias.st status git config --global alias.co checkout git config --global alias.ct commit git config --global alias.df diff git config --global alias.br branch
我手比较快,快了就容易打错,因此我也设置了一个 git
的别名 gti
:bash
# 编辑 .bash_profile,新增一行 alias gti='git' # 使配置生效 source ~/.bash_profile
有时手快,把 git st
敲成了 gti st
,也能 work~code