git config 配置命令

206 阅读1分钟

查看配置信息

查看系统配置信息
git config --system --list

查看当前用户配置信息
git config --global  --list

查看当前仓库配置信息
git config --local --list

修改配置信息(以global为例)

增加当前用户配置信息
git config --global [配置信息名称] [配置信息内容]
例如:git config --global user.name "John Doe"

删除当前用户配置信息 git config --global --unset [配置信息名称]
例如:git config --global --unset user.name