How to undo a commit and redo? →

Here is how

git commit ...
$ git reset --soft HEAD^
$ edit
$ git commit -a -c ORIG_HEAD