gitgithubcommit

GitHub Commits Showing Someone Else's Name (Incorrect Name)


Whenever I push my local commits to GitHub through VS Code, it displays a commit name (not commit message) that's not mine. I can confirm the account logged on my VS Code is mine, and the one on my Chrome browser is also correct.


Solution

  • To solve this, make sure you are in you project folder in VS Code or your IDE terminal, then run git config -l --show-origin, this will show a list of git config files. On same terminal, do Ctrl+F to find the strange name displayed on your commits, or look through the result of the command to see if there is any strange email address, then Ctrl+Click on the file path by its left and open with VS Code or your IDE. Now rename the name to yours name or the email address to yours and save.

    All you commits henceforth will carry your name. You can delete the previous repo and start the commits all over in case you are not comfortable with it and there is nothing to lose.

    That's all.