问题
- 提交代码,但github上的绿格子没有变绿
- 新老账户切换
如果你不知道现在本地Git用的帐号是什么,你可以输入
Step 1 查看用户名
1 | git config user.name |
Step 2 查看用户邮箱
1 | git config user.email |
Step 3 修改用户名和邮箱的命令
1 | git config --global user.name "Your_username" |
注意
user.name,user.email 后面千万记得加空格,否则你就是提交了,Git也不会提醒你配置出错