Like I said already about hard reset, it's a nasty way to alter a commit. Then what is the better way?
That's exactly what I have written in this post about how we could use amend and what does it do.
* Please read this post fully before executing any command. My scenario might not be same as yours.
What is amend in git commit?
git commit --amend
Is that all?
- Update the latest commit message
- Add / Remove / Modify files from / to the latest commit