so essentially i made a bunch of accidental commits that got pushed to my remote branch. I wanted to remove them from the history so i used commands:
git push my-branch :master
git reset --hard [COMMIT HASH]
this deleted the branch my-branch on remote, but kept it locally where the head was set to the commit I wanted it to be.
Now when i try to use command
git push my-branch master
I get two errors (not sure if they're related) the first is commiter's email does not follow the pattern. and the second is remote rejected my-branch -> my-branch (pre-receive hook declined)
The commiter's email that the error lists is not my email (who made the commit), When i check the commit details it says i am the author and lists my email, so i'm not sure where it's seeing this other email. I've already tried setting the global config username and email and amending, but nothing changes.
As for the second error, Master is a protected branch, but i have had no problem pulling and pushing this entire time until now.