Going back
Revert the changes in uncommited but stagged changes
git reset --hard
Revert the changes in individual files
git checkout file
Simply unstag a file
git reset file.ext
Remove completely from history
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch FILENAME" HEAD
and then
rm -rf .git/refs/original/ && git reflog expire --all && git gc --aggressive --prune
Adding to a commit
Forgot something in your last commit? That's easy to fix.
Just after committing add that stuff you forgot:
git add forgot.txt these.txt
git commit --amend
But if it is after some other changes
git reset --soft HEAD~
git add forgot.txt these.txt
git commit