配置文件
当前仓库配置文件
.git/config
全局用户配置文件
.gitconfig
配置命令
手动修改配置文件
[alias]
st = status
cm = commit
co = checkout
br = branch
ad = add
ac = !git add . && git commit -m \"哈哈\" && git push
命令行配置命令
git config --global alias.xx [git 命令]
注意:加上global针对当前用户,不加只针对当前仓库。[git 命令]接受单个命令或者
''
包起来的多个命令拼接的字符串
好用的库存命令
git log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"