Reputation: 23
I cloned fresh repo of my code. Then I made necessary changes in repo followed by these three steps
git add --all
git commit
git push -u origin master
It asks username,password, which I enter.
but after the push, git repo shows changes authored by my colleague rather than what I am. Why so? can't get it.
Upvotes: 2
Views: 71
Reputation: 13910
Check what is the email in the config
git config --global user.email
if it is not yours, change and commit again:
$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]
Upvotes: 1
Reputation: 46208
Does it locally show the author of your commit as your colleague when you do git log
?
You can check "who you're committing as" by running these commands:
git config user.name
git config --global user.name
And ensure your email is properly associated with your GitHub account. You can check your local email address settings the same way:
git config user.email
git config --global user.email
Upvotes: 0