The --amend option to git commit is roughly equivalent to performing git reset --soft HEAD^, followed by fixing the files needed and adding those to the staging area. Then, we will run git commit reusing the commit message from the previous commit (git commit -c ORIG_HEAD).