Issue
I had a GitHub account, which I deleted. Before deleting it, I created a new account and forked an existing repository to it.
Now what happens, whenever I commit anything from command line, using GitHub credentials, the repository gets updated alright, but the commit is shown as it has been done by my old account. That account does not exist! It has been deleted!
Yet my commits from my new account shows the previous account as the committer.
I have already tried setting
git config --global usr.name <username>
and
git config --global usr.email <github email address>
But that doesn't work.
When I check by typing git config usr.name
, it rightly shows my new username, but when I commit and push, using authentication for the new account, the commit shows in the name of my old account in the website.
How does this happen, and how do I get rid of it?
Solution
It is git config --global user.email "[email protected]"
not usr.email
.
Also it could be that you've set email in repository before, to fix that you need to run same command anywhere in repository and omit --global
switch. Github has good help page on how to do this here.
Answered By - blami Answer Checked By - Marie Seifert (WPSolving Admin)