1
0
Fork 0

Moving current_branch() to git plugin

pull/4/head
Robby Russell 15 years ago
parent a77aceaf5e
commit d164123064

@ -11,12 +11,3 @@ parse_git_dirty () {
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
fi
}
#
# Will return the current branch name
# Usage example: git pull origin $(current_branch)
#
function current_branch() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo ${ref#refs/heads/}
}

@ -17,5 +17,15 @@ alias gcp='git cherry-pick'
# Git and svn mix
alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
#
# Will return the current branch name
# Usage example: git pull origin $(current_branch)
#
function current_branch() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo ${ref#refs/heads/}
}
# these aliases take advangate of the previous function
alias ggpull='git pull origin $(current_branch)'
alias ggpush='git push origin $(current_branch)'

Loading…
Cancel
Save