how to reset back to commit id in git

C++
git reset --hard id
git push --force
Source

Also in C++: