I’m starting using git and github.com. For a test, I created a repo using account1, then import and commit changes, pushed. All good. Then I created another account (account2), cloned them to another folder on my computer, made some changes then pushed.
Oddly enough, the ‘git log’ command shows that the author that did the last ‘push’ is account1, not account2. The comment is explicitly the one I made from account2, but the author is messed up.
The client I use is GitBash running on MINGW32, I already tried closing/restarting the clients several times, no hope. Anybody got the same problem? Tks
Check if your global config doesn’t include
user.emailset toaccount1‘s email address.The email address would be the parameter on which GitHub determines the author of a commit.
See as an illustration of this issue “Git author Unknown“.
As mentioned in demas‘s answer, you need to set that information in the local git config for each repo:
git config user.email ....That way, even if you have a global config, you won’t have any identification issue when you push from one or the other repo.