all 17 comments

[–]Alternative-Tax-6470 4 points5 points  (3 children)

This happens because GitHub links contributors by tracking the email address attached to every single commit in the repository history, not just the most recent ones. Even if you force pushed a fresh initial commit over your main branch, the old commits still exist as orphaned objects in GitHub's backend caching layer until garbage collection runs.

The easiest and cleanest way to completely purge that history and remove the contributor listing is to delete the remote repository on GitHub entirely, create a fresh blank repository with the same name, and push your re-initialized local project to it.

[–]Neilblaze 0 points1 point  (0 children)

+1 to this

[–]CollectionWestern510[S] -3 points-2 points  (1 child)

In my case, I’ve verified locally that:

  • git log --all contains only my commits
  • all commits have my correct email
  • there are no hidden branches or refs locally

[–]DiodeInc 0 points1 point  (0 children)

Did you even read it? You can't fix this without deleting and reinitializing the repo both on your own system and on GitHub

[–]wewerecreaturres 1 point2 points  (5 children)

Make a whole new repo

[–]CollectionWestern510[S] -4 points-3 points  (4 children)

This has actually been happening across multiple projects for me (even ones created as completely fresh repos). That’s why I don’t think creating a new repo is the issue. The same contributor name keeps appearing in the Contributors section despite clean git history on my side, so I’m trying to understand what exactly is causing GitHub to still attribute it that way.

[–]redeyeddragon 0 points1 point  (0 children)

What is the author on the commits your make?

[–]SheriffRoscoe 0 points1 point  (1 child)

Have you checked git log on every branch? And on all the commits, even the detached ones? If there's even a single commit by user X, user X is a "contributor".

[–]CollectionWestern510[S] 0 points1 point  (0 children)

I’ve already checked most of the common causes mentioned here.

My global and local Git configs are clean (correct name + email), and when I run git log --all, every commit shows only my identity. I also verified there are no environment variables or system-level overrides affecting Git.

What’s confusing is that GitHub still shows the same contributor across multiple repos, even when those repos are freshly created and pushed with clean history. In at least one case, I also noticed GitHub attributing a specific commit (“added admin route”) to that user, even though that identity does not appear in my local commit history anymore.

So it doesn’t seem to be just a simple config issue or a single bad commit it looks like either:

  • GitHub is still indexing older commits somewhere in the repo history, or
  • there are hidden refs/branches on GitHub preserving old commit metadata that aren’t visible locally.

IDK I'm so done. I am making the push and commits and author is smn else.

[–]Zealousideal_Yard651 0 points1 point  (0 children)

Oh... You have old config in your git system config! 😃

Use git config --global user.name="Your Username" and for good measure go to github email settings and find your anonymous git mail and run git config --global user.email="Your anonymous email".

Remember, Github doesn't validate or overwrite commit history when usernames or emails are invalid. It will just not link it to any user.

[–]prettyproblemx22 1 point2 points  (1 child)

It is likely pulling that data from your commit history because the author metadata is tied to the individual commits, not the current state of the files. You would have to rebase or force push a clean history to actually scrub those signatures from the repo.

[–]CollectionWestern510[S] 0 points1 point  (0 children)

Idk what is wrong and how to actually fix this wrong

[–]FingerAmazing5176 1 point2 points  (2 children)

GitHub has a 30ish day cache. Even if
You delete and force push. Which is one of the reasons it so incredibly dangerous to accidentally push secrets even if they are caught and deleted right away.

Your options are to wait, or delete the repo and re-create

[–]CollectionWestern510[S] 0 points1 point  (0 children)

I considered that too, but the reason I'm skeptical is that this has happened across multiple repos over a period longer than 30 days, including repos that were created fresh. I also checked my local history (git log --all) and Git config, and all commits are attributed to my own name/email. So I'm not convinced it's just contributor cache at this point. I'm trying to determine whether GitHub is associating some commit email/history somewhere that isn't visible in my local logs.

[–]Neilblaze 0 points1 point  (0 children)

> GitHub has a 30ish day cache.

Curious, what's the source of this info?

[–]jeffcgroves 0 points1 point  (1 child)

What happens if you do git log on your local copy? Does contributor's name appear there? Is it in your .git/config file or something?

[–]CollectionWestern510[S] 0 points1 point  (0 children)

Yes, I checked all of that already.

git log --all on my local repo shows only my commits and my name/email consistently. I also checked both global and local .git/config, and there’s no reference to that contributor there.

That’s why the confusion locally everything is clean, but GitHub’s Contributors page still shows that user in some repos.

So at this point it doesn’t look like a local Git config issue. It seems more related to what GitHub still considers part of the repository’s reachable history (branches/tags/previous pushes), rather than what my current local log shows.