Maksim Nesterenko
Maksim Nesterenko

Reputation: 6213

How to push to remote repo under another user

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://[email protected]': <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?

Upvotes: 5

Views: 7369

Answers (2)

zerkms
zerkms

Reputation: 254926

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

Upvotes: 2

d1xlord
d1xlord

Reputation: 249

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

Upvotes: 2

Related Questions