Create a new local git repository in current directory
git init
Check out (and switch to) remote branch
git checkout <remote branch name>
Update current branch
git pull
Add all files in current directory to next commit
git add .
Commit current set of changes
git commit -a -m "<your commit message>"
Push your commit to remote
git push
Display list of all available branches, both local and remote
git branch -a
Clean up list of remote branches
git remote prune origin
Delete local branches that no longer exist on remote
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
Stash your current set of (uncommited) changes and revert to HEAD
git stash
Display log of previous commits
git log
Compare local changes to what's on remote
git diff