Tricks to make your life with git even easier.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Git Config

Here's a better version of a .gitconfig. Just save this text as ~/.gitconfig.

Note: Be sure to put your name and email where it says!

  name = 'Your Name'
  email =

  ui = auto
[color "branch"]
  current = yellow reverse
  local = yellow
  remote = green
[color "diff"]
  meta = yellow bold
  frag = magenta bold
  old = red bold
  new = green bold
  whitespace = red reverse
[color "status"]
  added = green
  changed = yellow
  untracked = red


  st = status
  ci = commit
  br = branch
  co = checkout
  df = diff
  dc = diff --cached
  lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
  lol = log --graph --decorate --pretty=oneline --abbrev-commit
  lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
  ls = ls-files
  unstage = reset HEAD

  # Show files ignored by git:
  ign = ls-files -o -i --exclude-standard

Sources: Cheat Sheets, Coder Journal