I've seen from Change the author and committer name and e-mail of multiple commits in Git how to change my email in my commits; however, when I try to push it, I get this error:
$ git push production master
To git@<remote_server>
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@<remote_server>
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'Note about
fast-forwards' section of 'git push --help' for details.
So then I tried to execute the commit-email-changing-command in the remote repo and it shows me You need to run this command from the toplevel of the working tree.