git push f head

C++
git checkout branchname # if you're not on it already
git reset --hard abcdef0
git push -f

Source

Also in C++: