Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 0.63 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. cat <<EOF >> ~/.gitconfig
  2. [alias]
  3.     alias = !sh -c '[ $# = 2 ] && git config --global alias.\"$1\" \"$2\" && exit 0 || echo \"usage: git alias <new alias> <original command>\" >&2 && exit 1' -
  4.     st = status
  5.     ci = commit
  6.     br = branch
  7.     co = checkout
  8.     df = diff
  9.     p = push
  10.     lg = log -p
  11.     who = shortlog -s --
  12.     switchpull = !sh -c 'CURRENT=$(git symbolic-ref HEAD|cut -d"/" -f3) && echo "git checkout $1 && git pull && git checkout $CURRENT" && git checkout $1 && git pull && git checkout $CURRENT' -
  13.     cleanup = !sh -c 'git push 2>&1|grep "non-fast"|cut -d"-" -f1|cut -d"]" -f2| xargs git switchpull'
  14. EOF