What
Undo the last commit but keep changes as staged modifications.
Why
Accidentally committed files you want to exclude, or need to amend the commit.
How
git reset --soft HEAD~1
Files return to staging area. Remove unwanted files with git reset <files>, then re-commit.