
Untitled
By: a guest on
May 2nd, 2012 | syntax:
None | size: 0.63 KB | hits: 16 | expires: Never
cat <<EOF >> ~/.gitconfig
[alias]
alias = !sh -c '[ $# = 2 ] && git config --global alias.\"$1\" \"$2\" && exit 0 || echo \"usage: git alias <new alias> <original command>\" >&2 && exit 1' -
st = status
ci = commit
br = branch
co = checkout
df = diff
p = push
lg = log -p
who = shortlog -s --
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' -
cleanup = !sh -c 'git push 2>&1|grep "non-fast"|cut -d"-" -f1|cut -d"]" -f2| xargs git switchpull'
EOF