Why is an unfamiliar GitHub profile appearing as the author of a commit?

August 19, 2026 2 answers
Asked by quietly competitive
I created a new GitHub account and a private repository, then made an initial commit through VS Code. My commit shows my name, but an additional commit appears immediately afterward with no code changes and is attributed to an unfamiliar GitHub user from another country. That account has existed for years and contains several projects. I deleted and recreated the repository three times, and the same thing happened each time. There is nothing sensitive in the repository, but I would like to understand how this attribution could be occurring.

Answers

deep-sea-diver
The unfamiliar profile may not actually be an extra person making changes. GitHub associates commits with accounts based largely on the email address in the commit metadata. If that email was copied from an old setup or is shared with another account, the commit can appear under that user's profile. Also compare the commit history and hashes to determine whether there is truly a second commit or just an attribution/display issue.

quietly competitive: So the first thing to check is the name and email configured in Git on the computer, rather than assuming the GitHub login itself was compromised.

Reply to this answer
68 in the shade
Check your local Git configuration. Git records the author name and email stored in settings such as `user.name` and `user.email`; those values are separate from the GitHub account used to authenticate the push. If the configured email belongs to, or matches an email publicly associated with, another GitHub user, GitHub can link the commit to that profile. Check the configuration with `git config --list` or `git config user.email`, then correct it if necessary.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions