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

[Original page](https://www.myrecon.xyz/blog/github-private-email-old-commits.html)

Updated 30 November 2026 · [MyRecon editorial](https://www.myrecon.xyz/about.html) · [How we check facts](https://www.myrecon.xyz/about.html#editorial-method)

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](https://images.unsplash.com/photo-1564697259644-03cd5e7363fa?auto=format&fit=crop&w=1200&q=80)

[Logan Jeffrey / Unsplash](https://unsplash.com/photos/person-using-laptop-mJ6E0ZQDMQ8) · 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 commit | What controls the email address |
| --- | --- |
| GitHub website | Enable 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 client | Set your commit address in Git. A repository-specific `user.email` overrides your global setting for that project. |
| A commit already exists | The 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](https://docs.github.com/en/account-and-profile/how-tos/email-preferences/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](https://git-scm.com/docs/pretty-formats) 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](https://docs.github.com/en/account-and-profile/reference/email-addresses-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](https://docs.github.com/en/account-and-profile/how-tos/email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address) 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](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository).

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](https://www.myrecon.xyz/find/github-profile#can-people-see-my-private-github-contributions). For a broader audit, use the [digital footprint checker](https://www.myrecon.xyz/digital-footprint-checker.html).

**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](https://www.myrecon.xyz/terms.html) and [privacy policy](https://www.myrecon.xyz/privacy.html).

## Continue your research

*   [How Reusing a Username Can Connect Your Accounts](https://www.myrecon.xyz/blog/username-reuse-privacy.html)
*   [Why Online Privacy Matters, Even When You Have Nothing to Hide](https://www.myrecon.xyz/blog/why-online-privacy-matters.html)
*   [Someone used my email to create an account. What should I do?](https://www.myrecon.xyz/blog/someone-used-my-email-to-create-an-account.html)

[Try the MyRecon OSINT tool](https://www.myrecon.xyz/#tool) · [Username checker](https://www.myrecon.xyz/username-checker.html) · [More from the MyRecon blog](https://www.myrecon.xyz/blog/) · [Browse all guides](https://www.myrecon.xyz/guides/)
