Branches

git branchList all local branches
git branch -aList remote and local branches
git checkout -b branch_nameCreate a local branch and switch to it
git checkout branch_nameSwitch to an existing branch
git push origin branch_namePush branch to remote
git branch -m new_nameRename current branch
git branch -d branch_nameDelete a local branch
git push origin :branch_nameDelete a remote branch

Logs

git log --onelineShow commit history in single lines
git log -2Show commit history for last N commits
git log -p -2Show commit history for last N commits with diff
git diffShow all local file changes in the working tree
git diff myfileShow changes made to a file
git blame myfileShow who changed what & when in a file
git remote show originShow remote branches and their mapp

Cleanup

git clean -fDelete all untracked files
git clean -dfDelete all untracked files and directories
git checkout -- .Undo local modifications to all files
git reset HEAD myfileUnstage a file

Tags

git pull --tagsGet remote tags
git checkout tag_nameSwitch to an existing tag
git tagList all tags
git tag -a tag_name -m "tag message"Create a new tag
git push --tagsPush all tags to remote repo

Stashes

git stash save "stash name" && git stashSave changes to a stash
git stash listList all stashes
git stash popApply a stash and delete it from stash list