plugins/git/git.plugin.zsh
3cf9ab72
 # Aliases
 alias g='git'
57f55e69
 compdef g=git
3cf9ab72
 alias gst='git status'
2e949296
 compdef _git gst=git-status
3cf9ab72
 alias gl='git pull'
2e949296
 compdef _git gl=git-pull
3cf9ab72
 alias gup='git fetch && git rebase'
4cd4167c
 compdef _git gup=git-fetch
3cf9ab72
 alias gp='git push'
2e949296
 compdef _git gp=git-push
7553d017
 gdv() { git diff -w "$@" | view - }
4cd4167c
 compdef _git gdv=git-diff
3cf9ab72
 alias gc='git commit -v'
4cd4167c
 compdef _git gc=git-commit
3cf9ab72
 alias gca='git commit -v -a'
4cd4167c
 compdef _git gca=git-commit
8edf4173
 alias gco='git checkout'
2e949296
 compdef _git gco=git-checkout
12a04571
 alias gcm='git checkout master'
3cf9ab72
 alias gb='git branch'
2e949296
 compdef _git gb=git-branch
3cf9ab72
 alias gba='git branch -a'
4cd4167c
 compdef _git gba=git-branch
3cf9ab72
 alias gcount='git shortlog -sn'
57f55e69
 compdef gcount=git
3cf9ab72
 alias gcp='git cherry-pick'
2e949296
 compdef _git gcp=git-cherry-pick
dfbed8fd
 alias glg='git log --stat --max-count=5'
2e949296
 compdef _git glg=git-log
6bb0c1c9
 alias glgg='git log --graph --max-count=5'
 compdef _git glgg=git-log
1fb141cf
 alias gss='git status -s'
 compdef _git gss=git-status
bd6aba9c
 alias ga='git add'
 compdef _git ga=git-add
c1c7b0e4
 alias gm='git merge'
 compdef _git gm=git-merge
ae735335
 alias grh='git reset HEAD'
9ac98f6c
 alias grhh='git reset HEAD --hard'
3cf9ab72
 
 # Git and svn mix
 alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
2e949296
 compdef git-svn-dcommit-push=git
3cf9ab72
 
96b0af68
 alias gsr='git svn rebase'
 alias gsd='git svn dcommit'
27904c11
 #
 # 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/}
 }
 
1a8ceef5
 # these aliases take advantage of the previous function
3cf9ab72
 alias ggpull='git pull origin $(current_branch)'
57f55e69
 compdef ggpull=git
3cf9ab72
 alias ggpush='git push origin $(current_branch)'
57f55e69
 compdef ggpush=git
1a8ceef5
 alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
8769e5f8
 compdef ggpnp=git