Git学习笔记--7

定制Git

配置别名

比如你不想敲checkout,这个单词有点长,可以给他起个别名co,

$ git config --global alias.co checkout
$ git config --global alias.ci commit $ git config --global alias.br branch
别名不想要了,可以这样删除
$ git config --global --unset alias.<youralias>

global表示这是全局命令,对本机所有仓库有效

删除还可以在配置文件中删除,配置文件在 .git/config文件中,用记事本打开删除对应行即可。这是global操作。

配置颜色

或者你可以通过color.ui选项把颜色全部打开:

$ git config color.ui true

还有很多个性化配置……

猜你喜欢

转载自www.cnblogs.com/cpcpp/p/12961393.html