!!!UNDER CONSTRUCTION!!!
HEAD is the working directory. HEAD~1 means one commit behind the latest one. HEAD~2 two commits before and so on.
origin/master is the remote repository that's on the server (f.e. github).
git checkout -- filename.ext
git commit -m "I changed file X because of foobar"
git commit --amend
git log
git diff HEAD~1 HEAD
git fetch -v
See also 'rebase' → 'Resolve pushing issues'.
git rebase origin/master master