Skip to content

Instantly share code, notes, and snippets.

@Makazone
Created July 13, 2015 08:07
Show Gist options
  • Save Makazone/fd495694e647b651b8fd to your computer and use it in GitHub Desktop.
Save Makazone/fd495694e647b651b8fd to your computer and use it in GitHub Desktop.
Useful git commands
#The tools to compare branches:
git diff b1..b2
git log b1..b2
git shortlog b1..b2
# See files different in two branches
git diff --name-status b1..b2
#Optimal git text width (based on http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
:set textwidth=72 # vim setting
# Shows history of your commits, where your branch pointers are and how your history has diverged
git log --oneline --decorate --graph --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment