bitbucket how to undo commit

C++
git reset --soft <commit hash, example: 52f823c>
git push -f
Source

Also in C++: