Maverik
Maverik

Reputation: 2408

Github doesn't show the right author of a commit

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

Upvotes: 4

Views: 2199

Answers (2)

Wivlaro
Wivlaro

Reputation: 1515

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

Upvotes: 8

René Höhle
René Höhle

Reputation: 27325

Go to your project folder.

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

[user]
    name = xxx
    email = xxx

Perhaps your informations are wrong.

Upvotes: 3

Related Questions