summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/git.zsh9
-rw-r--r--plugins/git.plugin.zsh10
2 files changed, 10 insertions, 9 deletions
diff --git a/lib/git.zsh b/lib/git.zsh
index a54e5bcbb..889dd98df 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -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/}
-}
diff --git a/plugins/git.plugin.zsh b/plugins/git.plugin.zsh
index 26777a62a..e0d967056 100644
--- a/plugins/git.plugin.zsh
+++ b/plugins/git.plugin.zsh
@@ -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)'