git push <remotename> <commit SHA>:<remotebranchname>

e.g.

git checkout <ref>
git push origin HEAD:master