Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github doesn't show the right author of a commit

Tags:

git

github

I have an account on github and I am the owner of an organization.

I don't understand why when I do 'git commit' an then 'git push' the webpage shows the name of the organization as author of the commit.

When I run 'git push' I use the username and the password of my account.

Thanks

like image 934
Maverik Avatar asked Dec 20 '22 19:12

Maverik


2 Answers

The commit user will not be affected by git push, you need to commit as the correct user.

You can set this by doing:

git config --global user.name "My Name"
git config --global user.email [email protected]

If you want to fix the last existing commit (that has NOT been pushed), you can do

git commit --amend --reset-author
like image 151
Wivlaro Avatar answered Jan 10 '23 14:01

Wivlaro


Go to your project folder.

Under ".git/config" you can see your information.

[user]
    name = xxx
    email = xxx

Perhaps your informations are wrong.

like image 32
René Höhle Avatar answered Jan 10 '23 14:01

René Höhle