I deleted my active branch in GitX, and now I can't seem to get out of it in the terminal.
When I try to check out any other branch, it tells me I have unstashed changes -- but I can't stash them (I get "fatal: bad revision 'HEAD'").
I've tried to re-create the branch, but then I get "fatal: You are on a branch yet to be born"
And I've tried to merely check out the branch, but of course, since it's deleted, I can't.
How can I get un-stuck?
git reset --hard [SHA of previous master commit]