Is there any way to reset a remote branch pointer to a SHA that you know is in the remote reflog, but that you don't have in your local repo?
I'm very familiar with how reset (soft/mixed/hard) works on a local repo, but that doesn't help me here.
Here's the situation I'm trying to fix. I hadn't done a fetch in a little while and the remote master had been updated with a merge that I didn't have locally yet.
I screwed up and did a git push --force
meaning to update only the remote feature branch but forgot an argument and ended up forcing the feature branch AND master to the revisions that I had locally.
This meant that master was now missing a merge commit that had happened since I last fetched. We're using github, so I had an e-mail that told me the SHA that master was at previously. I was also able to go to the url and see that the commit was still there (not garbage collected yet).
I was able to "fix" it by just redoing the merge that I lost and pushing that out again (which ended up changing the SHA because it was a different committer and time). This isn't optimal and could have been much worse if I'd been missing more than one merge commit on master.
What I would have like to have done was just reset --hard
the remote master branch to the SHA that it was supposed to be at. Is there any way to do that without SSH access to the repo?
This is on github, so I don't have direct access to the repo to be able to ssh out there and reset it directly.