Removing a stale Claude avatar from GitHub contributors

For months, the GitHub repo of my social scheduler CogSend showed 6 contributors in the sidebar, and one of them was Claude. But not a single commit on main had a Claude author, committer, or Co-authored-by trailer. While the UI showed Claude as a contributor, the contributors API didn't show Claude.

So the sidebar was just stale cached data, and even though GitHub says it refreshes in about 24 hours, this one never did.

I opened a support ticket asking them to rebuild the contributor data, but GitHub closed it saying that this level of support is only for paid plans.

What finally worked was renaming the default branch to something temporary and then back to main, which forced GitHub to recalculate. It can be done from Settings → General → Default branch, or with two API calls a few minutes apart.

gh api -X POST repos/OWNER/REPO/branches/main/rename -f new_name=main-tmp
gh api -X POST repos/OWNER/REPO/branches/main-tmp/rename -f new_name=main

The Claude avatar disappeared immediately after that, and then I quickly changed back the default branch name from main-tmp to main, and then all good after that.

But if you're doing it, do it at a quiet time, because any workflow or release that checks out main will fail while the branch has the temporary name.

And to stop Claude Code from adding the co-author trailer in the first place, this goes in ~/.claude/settings.json.

"attribution": {
  "commit": "",
  "pr": ""
}

Or, you can also set "includeCoAuthoredBy": false in ~/.claude/settings.json file.