Sharing my git cheat sheet
martinadams.tumblr.com
martinadams.tumblr.com
git checkout -t origin/branch-name
Other things that are useful:Push and track a branch at the same time:
git push -u origin foo
Merge a branch and always generate a merge commit, even if a fast-forward was possible: git merge --no-ff foo
A condensed and useful status output: git status -sb
Useful `git log` options: --abbrev-commit
(Shows as short a commitish as possible) --color-words
(Show word-level diffs in the same line, rather than as two whole -/+ lines) --decorate
(Where a commit is also a ref (e.g. the latest commit on a branch), display that ref in the output)