git config --list [--system|--global|--local] 显示当前配置git config [--system|--global|--local] <key> <value> 设置参数git config -e [--system|--global|--local] 编辑配置git config --global alias.<alias-name> "<git-command>" 创建别名git <alias-name> <arguments> 使用别名git config --global --unset <key> 移除单个变量git config --global --unset-all <key> 移除所有变量# 设定身份
git config --global user.name "cheatsheet"
git config --global user.email "[email protected]"
# 首选编辑器
git config --global core.editor vim
# 设置自动命令行着色
git config --global color.ui auto
#长期保存账号和密码
git config --global credential.helper store
# 设置别名
git config --global alias.co checkout
#使用别名
git co master
#本地库文件配置
<repo>/.git/config
#系统登录用户全局配置
~/.gitconfig
#系统全局配置
/etc/gitconfig