123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- # Aliases
- alias g=
- compdef g=git
- alias gst=
- compdef _git gst=git-status
- alias gd=
- compdef _git gd=git-diff
- alias gl=
- compdef _git gl=git-pull
- alias gup=
- compdef _git gup=git-fetch
- alias gp=
- compdef _git gp=git-push
- alias gd=
- gdv() { git diff -w "$@" | view - }
- compdef _git gdv=git-diff
- alias gc=
- compdef _git gc=git-commit
- alias gc!=
- compdef _git gc!=git-commit
- alias gca=
- compdef _git gc=git-commit
- alias gca!=
- compdef _git gca!=git-commit
- alias gcmsg=
- compdef _git gcmsg=git-commit
- alias gco=
- compdef _git gco=git-checkout
- alias gcm=
- alias gr=
- compdef _git gr=git-remote
- alias grv=
- compdef _git grv=git-remote
- alias grmv=
- compdef _git grmv=git-remote
- alias grrm=
- compdef _git grrm=git-remote
- alias grset=
- compdef _git grset=git-remote
- alias grup=
- compdef _git grset=git-remote
- alias grbi=
- compdef _git grbi=git-rebase
- alias grbc=
- compdef _git grbc=git-rebase
- alias grba=
- compdef _git grba=git-rebase
- alias gb=
- compdef _git gb=git-branch
- alias gba=
- compdef _git gba=git-branch
- alias gcount=
- compdef gcount=git
- alias gcl=
- alias gcp=
- compdef _git gcp=git-cherry-pick
- alias glg=
- compdef _git glg=git-log
- alias glgg=
- compdef _git glgg=git-log
- alias glgga=
- compdef _git glgga=git-log
- alias glo=
- compdef _git glo=git-log
- alias gss=
- compdef _git gss=git-status
- alias ga=
- compdef _git ga=git-add
- alias gm=
- compdef _git gm=git-merge
- alias grh=
- alias grhh=
- alias gclean=
- alias gwc=
- #remove the gf alias
- #alias gf='git ls-files | grep'
- alias gpoat=
- alias gmt=
- compdef _git gm=git-mergetool
- alias gg=
- alias gga=
- alias gk=
- alias gsts=
- # Will cd into the top of the current repository
- # or submodule.
- alias grt=
- # 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) || \
- ref=$(git rev-parse --short HEAD 2> /dev/null) || return
- echo ${ref#refs/heads/}
- }
- function current_repository() {
- ref=$(git symbolic-ref HEAD 2> /dev/null) || \
- ref=$(git rev-parse --short HEAD 2> /dev/null) || return
- echo $(git remote -v | cut -d
- }
- # these aliases take advantage of the previous function
- alias ggpull=
- compdef ggpull=git
- alias ggpur=
- compdef ggpur=git
- alias ggpush=
- compdef ggpush=git
- alias ggpnp=
- compdef ggpnp=git
- # Pretty log messages
- function _git_log_prettily(){
- if ! [ -z $1 ]; then
- git log --pretty=$1
- fi
- }
- alias glp="_git_log_prettily"
- compdef _git glp=git-log
|