roll back last commit in git

C++
git reset --soft HEAD~1
Source

Also in C++: