If you get this error while working in detached HEAD mode, you can do this:
git push origin HEAD:remote-branch-name
See also: Making a Git push from a detached head
If you are on a different local branch than the remote branch, you can do this:
git push origin local-branch-name:remote-branch-name