简体   繁体   中英

How to make my old and deleted github account from appearing as the committer on commits I do from command line?

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?

It is git config --global user.email "email@example.com" 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM