EDIT: The intent is to do a completely clean reset of my local copy of master, to remote master. I prefer to reset to remote, over $ git reset --hard HEAD
, which I've found on occasion gives me issues.
I know I can delete a local git branch like so:
$ git branch -D master
but is there a way to do that if you have no other branches? as git won't let you delete the branch you're currently on.
Normally I'd just switch into another branch, but what if you have no other branches? Create a temporary branch?
NOTE: not quite a duplicate of this other question, I believe