Resolve Declined Commit Due to GitHub Email Privacy in Terminal on Mac - VicPhanDevOps/mac GitHub Wiki
• The following resolution is how to resolve when your commit is declined due to GitHub email privacy restriction.
•
• Go to your GitHub account in a web browser, expand the profile menu and select “Settings.”
•
• Select the “Emails” tab, scroll down to “Keep my addresses private” and click the checkbox. Highlight the non-reply email and press the “command” and “C” keys to copy it.
•
• Return to the Terminal, type git config --global user.email “< non-reply email >”
and press the “return” key to configure Git to use your non-reply email for commits.
•
• Type git reset --soft HEAD~1
and press the “return” key to reset settings.
•
• Type git commit -m “< commit message >”
and press the “return” key to commit your changes.
•
• Type git push
and press the “return” key to push your changes. This time your changes will complete.
•
• You can sanity check GitHub in the web browser to see the that latest commit happened.
•