initialize a repository:
git init
Show history of file, including when it was renamed:
git log --follow --all -p -- file
See changes for current version of file on line by line basis:
git blame file
Change history of an individual file:
git log -- file
Generate patches for each log entry:
git log -p file
See changes in files staged for commit:
git diff --cached
Setting username and email address:
git config --global --edit
Retrofitting to a commit:
git commit --amend --reset-author