Git操作切换本地帐号

如果本地之前已经保存了一个github账号, push以后显示之前的账号用户名,所以,需要把本地用户名给改一下。

解决方式:

git config --global user.name "Your_Username"
git config --global user.email username@xxx.com

然后,你可看一下这个文件:

vim ~/.gitconfig

完毕

原文地址:https://www.cnblogs.com/shiweida/p/8314321.html