Awesome GitHub Commands Reference Sheet (Quick Reference)

HEAD^       # 1 commit before head
HEAD^^ # 2 commits before head
HEAD~5 # 5 commits before head

Branches

# create a new branch
git checkout -b $branchname
git push origin $branchname --set-upstream
# get a remote branch
git fetch origin
git checkout --track origin/$branchname
# delete local remote-tracking branches (lol)
git remote prune origin
# list merged branches
git branch -a --merged