2015-05-29 30 views
2

我克隆了我的代码的新鲜回购。 然后我做了,然后这三个步骤为什么github显示不同的作者名?

git add --all 
git commit 
git push -u origin master 

它要求用户名,密码,这是我进入回购必要的修改。

但推后,git回购显示我的同事而不是我的创作变化。为什么这样? 不能得到它。

+0

你在Git中更改了你的配置设置吗?您可能还想使用SSH来简化推送到GitHub上。 –

+1

也许你偶然用你的同事用户名登录了? –

+1

'git config --list | grep user'显示你的名字,或你的同事名字? – larsks

回答

1

检查什么是在配置

git config --global user.email 

的电子邮件,如果它不是你的,改变并重新提交:

$ git config --global user.name "John Doe" 
$ git config --global user.email [email protected] 
+0

'git config --list --global'也可能有用 – laconbass

+0

确实这是全局配置问题!它被配置给我的同事姓名和电子邮件。作为git的新手,我很难弄清楚。非常感谢! – user3818223

0

是否在本地显示您的作者提交作为你的同事时,你做git log

您可以查看 “谁您提交的” 通过运行以下命令:

git config user.name 

git config --global user.name 

而且ensure your email is properly associated with your GitHub account。你可以用同样的方法检查你的本地电子邮件地址设置:

git config user.email 

git config --global user.email