Git housekeeping tutorial: clean-up outdated branches in
it reset --hard HEAD actually only resets to the last committed state. In this case HEAD refers to the HEAD of your branch. If you have several commits, this won't work. . What you probably want to do, is reset to the head of origin or whatever you remote repository is called.