DEV Community

Moses Goddey
Moses Goddey

Posted on AI-assisted

How to remove "claude" from your GitHub Contributors list

One day I asked Claude Code to help me push some changes to GitHub. A few minutes later I opened my repository and saw something I didn't expect: "claude" was listed as a contributor, right next to me.

I hadn't invited it. It had quietly added itself.

On a portfolio or client repo, that matters. The Contributors list should show the people who own and are responsible for the code. So I rewrote my commit history to remove the lines Claude had added.

But even after the rewrite, "claude" was still there. My history was clean, and GitHub was still showing it.

Here's what was going on, and the trick that finally removed it.

Why Claude shows up as a contributor

GitHub counts anyone named in a co-author line as a contributor. Claude Code adds this line to the end of its commit messages by default:

Co-Authored-By: Claude <noreply@anthropic.com>
Enter fullscreen mode Exit fullscreen mode

So every commit Claude makes for you credits it as a co-author, and GitHub adds it to the Contributors list.

Step 1: Check your history

Run this inside your repository, on your default branch:

git log --format="%h %s%n%b" | grep -i "co-authored-by: claude"
Enter fullscreen mode Exit fullscreen mode
  • It prints commits: the co-author lines are still in your history. Start with Case A.
  • It prints nothing: your commits are clean, and GitHub is showing old data. Go to Case B.

Case A: the co-author lines are still in your history

This is the step I did first. GitHub is reading real data from your commits, so you have to rewrite those commit messages and force-push.

Be careful:

  • Back up your repository first.
  • Only do it on a repo nobody else is working on. Force-pushing rewrites shared history and will cause problems for anyone who has cloned it.

When you're done, run the git log command again. If it prints nothing but Claude is still listed, you're in Case B, like I was.

Case B: the history is clean, but Claude is still listed

GitHub's Contributors sidebar was still showing old cached data. This fix took me about two minutes and doesn't touch your code:

  1. On your repo page, click the main branch button, type temp, and click Create branch temp from main.
  2. Go to Settings > General > Default branch, click the switch icon (two arrows), choose temp, click Update, and confirm.
  3. Switch the default branch back to main the same way, and confirm.
  4. Go to Branches and delete temp.
  5. Wait a few minutes and reload the repo page.

My Contributors count went from 2 to 1.

This changes no files and no commit history. GitHub doesn't document it as an official fix, but changing the default branch made GitHub recalculate the list for me. If it doesn't work for you, contact GitHub Support and ask them to refresh your repository's contributors cache.

Stop it from happening again

Turn off the co-author line in Claude Code's settings. Open ~/.claude/settings.json (create it if it doesn't exist) and add:

{
  "attribution": {
    "commit": "",
    "pr": "",
    "sessionUrl": false
  }
}
Enter fullscreen mode Exit fullscreen mode

Setting commit to an empty string removes the co-author line from commits, and pr does the same for pull request descriptions. sessionUrl: false stops Claude Code adding a claude.ai session link to commits made from cloud or Remote Control sessions. This is the exact setup I use, and none of my commits credit Claude anymore.

Older guides mention a setting called includeCoAuthoredBy. It's now deprecated in favour of attribution, so use the version above.

Summary

  • Run the git log command to find out which case you're in.
  • Lines still in history: rewrite the commits carefully.
  • Clean history, still listed: switch the default branch to a temporary branch and back.
  • Going forward: set attribution in settings.json.

Did this work for you? Let me know in the comments, especially if you found another way.

Top comments (0)