A colleague told me he'd accidentally committed something. Now he wanted to remove it from the previous commit and then put in a new commit. This is called splitting a commit, and here's the best way I know of how to do it.
git reset --soft HEAD~
Undo the last commit, but preserve "Changes to be committed"git reset <some/path>
Exclude what you wantgit commit -C ORIG_HEAD
Commit with the same message as before, which was stored inORIG_HEAD