This commit is contained in:
GitHub Merge Button 2012-05-31 14:48:22 -07:00
commit c1fd0c8faa
2 changed files with 8 additions and 3 deletions

View file

@ -54,10 +54,15 @@ function current_branch() {
echo ${ref#refs/heads/}
}
function git_current_upstream(){
local upstream=$(git config --get branch."$(current_branch)".remote) || return
echo $upstream
}
# these aliases take advantage of the previous function
alias ggpull='git pull origin $(current_branch)'
compdef ggpull=git
alias ggpush='git push origin $(current_branch)'
compdef ggpush=git
alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
compdef ggpnp=git
compdef ggpnp=git