how to unstage a commit

C++
git reset HEAD~
Source

Also in C++: