I’ve got some code that I want to put into a new repo on GitHub. I’ve already performed a
git init to initialize the repo locally. I’m also using GitHub Desktop, so that I can push it to a new repo in my GitHub account. When I tried I got the:
Cannot push these commits as they contain an email address marked as private on GitHub.
error message. I do want to keep my email private, so I used the
git config --local user.email command to defined the email address for this repo. (I use multiple Git hosts, so I try to define the email address for each local repo.
However, when I do a
git config --list I see that both my private email is shown (defined globally, I presume) and the users.noreply.github.com also is displayed, which I presume if the local definition for this local repo.
What I’d like to know is how do I proceed so I can push this code into the remote repo on GitHub, yet only use the users.noreply.github.com email address?