uncommit git
xxxxxxxxxx
git commit -m "wrong commit"
$ git reset HEAD~
#------- Your final change -----------#
$ git add .
$ git commit -m "Your commit msg"
xxxxxxxxxx
If you haven't pushed your changes yet use
git reset --soft [Hash for one commit]
to rollback to a specific commit.
--soft tells git to keep the changes being rolled back
(i.e., mark the files as modified). --hard tells git to delete
the changes being rolled back.