Alias for Git sanity

Git command line is pretty confusing. Here are some aliases that I found helpful that normalize it with other command line commands and add a little bit better context.

Open global .gitconfig file:

$ open ~/.gitconfig

If there isn’t an [alias] section already, add one:

[alias]
  cd = checkout
  ls = branch
  delete-merged = !git branch --merged | egrep -v \"(^\\*|master|development)\" | xargs git branch -d
  new-up = !git push -u origin `git symbolic-ref --short HEAD`
  stage = add
  unstage = reset HEAD