Privacy

Does making my GitHub email private remove it from old commits?

Updated · MyRecon editorial · How we check facts

Turning on Keep my email addresses private on GitHub won't remove an email stored in an old commit. GitHub uses a no-reply address for new commits you make through its website with that setting enabled. For new commits from your terminal, set the address in Git too.

A person using a laptop beside a desktop monitor
Logan Jeffrey / Unsplash · Personal research · context photograph, not an affected user

Which GitHub email setting affects which commits?

Where to change the address you use going forward
Where you commitWhat controls the email address
GitHub websiteEnable email address privacy in Settings → Emails. GitHub uses its no-reply address for new commits you author in the web interface.
Terminal or a local Git clientSet your commit address in Git. A repository-specific user.email overrides your global setting for that project.
A commit already existsThe author and committer addresses already recorded in the commit remain in that commit. Check the repository history separately.

GitHub documents both settings in Setting your commit email address.

How can I check my own repository for an old email address?

In your local checkout, review the ten most recent commits reachable from the current branch. Each line shows the shortened commit ID, author email, then committer email. Check both fields on commits you made or committed yourself. The output stays in your terminal. Keep it private if it includes an address you want to protect.

git log -n 10 --format='%h | %ae | %ce'

Ten commits are a starting point. To review older history or other branches you have locally, remove -n 10 and add --all. This covers local references, including remote branches already fetched into your checkout. It cannot tell you what copies another person has retained. See Git's format reference for %ae and %ce.

How do I use a GitHub no-reply address from my terminal?

  1. In Settings → Emails, copy the no-reply address GitHub shows for your account. GitHub explains the formats in its email address reference.
  2. In the project directory, replace YOUR_GITHUB_NOREPLY_ADDRESS with the value you copied. This sets the address for that clone.
git config --local user.email "YOUR_GITHUB_NOREPLY_ADDRESS"
git config --get user.email

After making your next commit, check its author and committer email with git show -s --format='%ae | %ce' HEAD before pushing. If you work in multiple clones, check each one that matters.

GitHub's optional private email push block checks the author email on the most recent commit during a command-line push. Keep the history review separate if your push contains older commits.

A two-commit example you can check

On 30 November 2026, we made two empty commits in a local repository with no remote. We changed user.email between commits, then read back both fields. The test addresses are placeholders.

Second example | new-address@example.invalid | new-address@example.invalid
Original example | old-address@example.invalid | old-address@example.invalid

The new setting appeared on the second commit. The first still held the old address in both fields. GitHub's privacy setting governs its own web commits. This local exercise illustrates why changing Git configuration alone leaves old commits intact.

What if my email is already in public Git history?

Set the address you want to use for future commits first. If old public commits still matter, discuss the specific repository and commit IDs with its maintainers before any history rewrite. Rewriting history changes commit IDs and can affect pull requests, branches, forks, and collaborators' clones. A rewrite also leaves copies that other people already downloaded. GitHub explains these effects in its guidance on sensitive data in repositories.

Your profile bio, README and contact fields can expose a separate copy of the address. Review them in a signed-out window. If you also want to hide activity counts, see what visitors can see of your GitHub contributions. For a broader audit, use the digital footprint checker.

Use these checks for your own accounts or work you are authorised to do. MyRecon reports public-source results; a matching handle is not proof that two accounts belong to the same person. See our terms and privacy policy.

Try the MyRecon OSINT tool · Username checker · More from the MyRecon blog · Browse all guides