1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- # Aliases
- alias g=
- compdef g=git
- alias gst=
- compdef _git gst=git-status
- alias gl=
- compdef _git gl=git-pull
- alias gup=
- compdef _git gup=git-fetch
- alias gp=
- compdef _git gp=git-push
- gdv() { git-diff -w "$@" | view - }
- compdef _git gdv=git-diff
- alias gc=
- compdef _git gc=git-commit
- alias gca=
- compdef _git gca=git-commit
- alias gco=
- compdef _git gco=git-checkout
- alias gb=
- compdef _git gb=git-branch
- alias gba=
- compdef _git gba=git-branch
- alias gcount=
- compdef gcount=git
- alias gcp=
- compdef _git gcp=git-cherry-pick
- alias glg=
- compdef _git glg=git-log
- alias glgg=
- compdef _git glgg=git-log
- alias gss=
- compdef _git gss=git-status
- # Git and svn mix
- alias git-svn-dcommit-push=
- compdef git-svn-dcommit-push=git
- alias gsr=
- alias gsd=
- #
- # 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 advantage of the previous function
- alias ggpull=
- compdef ggpull=git
- alias ggpush=
- compdef ggpush=git
- alias ggpnp=
- compdef ggpnp=git
|