How to solve the "error: it is impossible to click on an unqualified address: HEAD"
I have a revision like A -> B -> C -> D -> E I tried rolling back to C and committed this as a new revision of F , but it doesn't seem to be the right way: I git checkout C , and then do some changes and then git commit . However, when I git push origin HEAD , it complains that:
error: unable to push to unqualified destination: HEAD The destination refspec neither matches an existing ref on the remote nor begins with refs/, and we are unable to guess a prefix based on the source ref.
As this SO question suggests, I tried git fetch -p origin , but that didn't work. The same error message is still received.
My question is, how can I get rid of this situation and fulfill my original goal (rollback to C and pass this to F )?
In addition, as follows from this question, I can:
git rm -r . git checkout HEAD~3 . git commit but i really don't want git rm -r . , because there are many unsolicited, but useful things.