Git切换账号

切换帐号其实很简单, 
如果你不知道现在本地Git用的帐号是什么,你可以输入

git config user.name

查看用户名

git config user.email

查看用户邮箱

修改用户名和邮箱的命令

git config --global user.name "Your_username"
git config --global user.email "Your_email"

有一点要注意, user.name/email后面千万记得加空格,否则你就是提交了,Git也不会提醒你配置出错

猜你喜欢

转载自blog.csdn.net/qq_33209777/article/details/112580687