Saturday, June 13, 2009

up

this() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}

alias up="git push origin `this`"




Update: put this in your .profile, but don't expect up to work from there. You have to run it from within the relevant directory. The only way around it I can think of at the moment is to set up some kind of auto-aliasing in the prompt.