I need to change a remote git branch to point to a previous commit in the commit tree.
I have four branches: master, ui, test, release. Master and UI are parallel development branches that are merged often. Test and release branches point to previous commits on master.
A coworker screwed up (don't ask) and did:
git checkout release
git reset --hard origin/ui
git push
And now I have been tasked with fixing it. My googlefu is failing me and while I can fix the release branch back to how it was on my local repo, I can't figure out how to push the change to the remote server (origin). I can't do revert because of all the merging between master and ui. I tried
branch -f release <SHA1>
and if I push I get
! [rejected] release -> release (non-fast-forward)
and it tells me I need to fast forward before I can push. I also tried
git reset --hard <SHA1>
with the same result. I found lots of help on removing previous commits to a remote repository but I am failing to find directions on how to move the pointer backwards on a commit tree. Any help would be appreciated.