5

I check this question about commit under another author git commit as different user without email / or only email
How can I also push to remote repo under another login. I do:

git commit --author="notMe" -m "whatever"
git push https://<remote-repo>
Username for 'https://github.com': notMe
Password for 'https://qRoman@github.com': <notMe's password>

But as result I got this: commit & push result How can I commit & push like another author?


UPD: I tried git config user.name "notMe" and result is:
result
It's almost what I want but why my avatar is still here?

Community
  • 1
  • 1
Maksim Nesterenko
  • 5,661
  • 11
  • 57
  • 91

2 Answers2

2

You created the commit as the author "notMe" but pushed using the current user for that repo (which is Alendorff). You can change the user for that repo by :

git config user.name "Billy Everyteen"

You can also check the current user for a repo by :

git config user.name

More can be found here

d1xlord
  • 239
  • 3
  • 4
  • 12
  • "but pushed using the default user" --- what does this mean? – zerkms Mar 14 '15 at 08:54
  • by default user, I meant the user currently set for that repo (which is Alendorff) – d1xlord Mar 14 '15 at 08:56
  • Well, if you check the question once again you will see, that OP put the credentials of another user specifically for the push operation. – zerkms Mar 14 '15 at 08:57
2

You need to specify both the name and the email of the author of a commit to entirely vanish traces of your current account.

zerkms
  • 249,484
  • 69
  • 436
  • 539