I want to know if there is a way to change the person(account) who pushed changes in a GitHub repository.
For example: I push to my private repository under a different name(not email) but I misspell one letter of my name and GitHub marks the commit as commited by userame not username;
On the command line, navigate to the repository that contains the commit you want to amend. Type git commit --amend and press Enter. In your text editor, edit the commit message, and save the commit.
I suggest you to fix the committer. Remember that there is a difference between the user who commit, and the committer. The committer is signed inside .git/config
folder:
$ cat .git/config
[user]
name = John Doe
email = [email protected]
Now, you just need to git commit --amend
and git push origin BRANCH -f
. The former command commit again (but this time with the committer updated). The latter, overwrite the branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With