Git push master fatal: You are not currently on a branch

Master is it at say commit #10. However, I ended up realizing I broke something along the way that wasn't caught by tests. I ended up going to commit #5, and then slowly re-did the dev of each com...