git commit --amend will add anything in the staging area (or index; the thing files get to when using git add), and let you change the commit message. If you only want to change the commit message leaving the index alone, you can use git commit --amend --only.
When you want to remove a file from the latest commit, after using git reset --soft and co. you can use git commit -C ORIG_HEAD so you don't have to enter the same commit message.
git commit --amend
will add anything in the staging area (or index; the thing files get to when usinggit add
), and let you change the commit message. If you only want to change the commit message leaving the index alone, you can usegit commit --amend --only
.When you want to remove a file from the latest commit, after using
git reset --soft
and co. you can usegit commit -C ORIG_HEAD
so you don't have to enter the same commit message.ππ»