You could just git add -a
to stage all the changes you reset
and then git commit
them, but I think you're going about this all wrong.
If you just want to fix an earlier commit message, you could do the following:
git rebase -i HEAD~2
This will rebase your last two commits of the branch, so no code will be changed. Once you do this, you will get a vim (or whatever your default editor is) screen that looks something like this:
pick 2a86f99 commit before that you want to fix
pick 09c407a commit that is at HEAD
change the
pick
in the commit you want to fix toreword
:reword 2a86f99 commit before that you want to fix pick 09c407a commit that is at HEAD
Save and quit (
:wq
in vim). git will rebase these changes and pause in an editor of the commit message you want to fix. Fix it, save, and quit, and you should be set to go.