git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
alias up="git push origin `this`"
.profile, but don't expect
upto 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.