Changing last commit

Only use this on non-pushed commits. Otherwise apply another commit.
To change last commit message (use git revert to generate a reversing commit if you already pushed):
git commit --amend

To remove last commit entirely:
git reset --hard HEAD~1

To add/remove a file from last commit:
git add/rm file
git commit --amend

Moving last commit to staged, keeping files in working tree:
git reset --mixed HEAD~1