git config 命令
git config –global 和 git config –system 的区别
打开命令行,输入 git config --global --list 和 git config --system --list
CMD 进入版本库位置,输入
git config --local --list
可知:
global 是全局配置文件 ,文件的位置在用户主目录下的.gitconfig文件
system 是系统配置文件,文件的位置在etc下的gitconfig
local是版本库配置文件,文件位置在.git/config
优先级是:local>global>system,而global存储的是提交用户的email和用户名,所以可手动设置config
git config --global user.name " "
git config --global user.email " "
如果删除的话,可使用如下命令:
git config --unset --global user.name
git config --unset --global user.email