add aliases from #2494

This commit is contained in:
ncanceill 2014-05-24 19:24:19 +02:00
commit 41b181ff37

View file

@ -62,6 +62,10 @@ compdef _git gup=git-fetch
# Push # Push
alias gp='git push' alias gp='git push'
compdef _git gp=git-push compdef _git gp=git-push
alias gpf='git push --force'
compdef _git gpf=git-push
alias gpd='git push --dry-run'
compdef _git gpd=git-push
alias gpoat='git push origin --all && git push origin --tags' alias gpoat='git push origin --all && git push origin --tags'
compdef _git gpoat=git-push compdef _git gpoat=git-push
# Commit # Commit
@ -96,14 +100,36 @@ compdef _git grset=git-remote
# Rebase # Rebase
alias grb='git rebase' alias grb='git rebase'
compdef _git grb=git-rebase compdef _git grb=git-rebase
alias grbi='git rebase -i'
compdef _git grbi=git-rebase
alias grbc='git rebase --continue' alias grbc='git rebase --continue'
compdef _git grbc=git-rebase compdef _git grbc=git-rebase
alias grbs='git rebase --skip' alias grbs='git rebase --skip'
compdef _git grbs=git-rebase compdef _git grbs=git-rebase
alias grba='git rebase --abort' alias grba='git rebase --abort'
compdef _git grba=git-rebase compdef _git grba=git-rebase
alias grbm='git rebase master'
compdef _git grbm=git-rebase
alias grbi='git rebase -i'
compdef _git grbi=git-rebase
alias gr1='git rebase -i HEAD~'
compdef _git gr1=git-rebase
alias gr2='git rebase -i HEAD~2'
compdef _git gr2=git-rebase
alias gr3='git rebase -i HEAD~3'
compdef _git gr3=git-rebase
alias gr4='git rebase -i HEAD~4'
compdef _git gr4=git-rebase
alias gr5='git rebase -i HEAD~5'
compdef _git gr5=git-rebase
alias gr6='git rebase -i HEAD~6'
compdef _git gr6=git-rebase
alias gr7='git rebase -i HEAD~7'
compdef _git gr7=git-rebase
alias gr8='git rebase -i HEAD~8'
compdef _git gr8=git-rebase
alias gr9='git rebase -i HEAD~9'
compdef _git gr9=git-rebase
alias gr10='git rebase -i HEAD~10'
compdef _git gr10=git-rebase
# Cherry-pick # Cherry-pick
alias gcp='git cherry-pick' alias gcp='git cherry-pick'
compdef _git gcp=git-cherry-pick compdef _git gcp=git-cherry-pick
@ -121,8 +147,12 @@ compdef _git ga=git-add
# Merge # Merge
alias gm='git merge' alias gm='git merge'
compdef _git gm=git-merge compdef _git gm=git-merge
alias gmum='git merge upstream/master'
compdef _git gmum=git-merge
alias gmt='git mergetool --no-prompt' alias gmt='git mergetool --no-prompt'
compdef _git gmt=git-mergetool compdef _git gmt=git-mergetool
alias gmtvim='git mergetool --no-prompt --tool=vimdiff'
compdef _git gmtvim=git-mergetool
# Reset # Reset
alias grh='git reset HEAD' alias grh='git reset HEAD'
compdef _git grh=git-reset compdef _git grh=git-reset
@ -144,6 +174,8 @@ alias glo='git log --oneline --decorate --color'
compdef _git glo=git-log compdef _git glo=git-log
alias glog='git log --oneline --decorate --color --graph' alias glog='git log --oneline --decorate --color --graph'
compdef _git glog=git-log compdef _git glog=git-log
alias glgm='git log --graph --max-count=10'
compdef _git glgm=git-log
alias gwch='git whatchanged -p --abbrev-commit --pretty=medium' alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
compdef _git gwch=git-whatchanged compdef _git gwch=git-whatchanged
alias glp="_git_log_prettily" alias glp="_git_log_prettily"
@ -154,10 +186,29 @@ alias gga='git gui citool --amend'
alias gk='gitk --all --branches' alias gk='gitk --all --branches'
# Stash # Stash
alias gsts='git stash show --text' alias gsts='git stash show --text'
compdef _git gsts='git-stash'
alias gsta='git stash' alias gsta='git stash'
compdef _git gsta='git-stash'
alias gstp='git stash pop' alias gstp='git stash pop'
compdef _git gstp='git-stash'
alias gstd='git stash drop' alias gstd='git stash drop'
compdef _git gstd='git-stash'
alias gstl='git stash list' alias gstl='git stash list'
compdef _git gstl='git-stash'
alias gstaa='git stash apply'
compdef _git gstaa='git-stash'
# Gitk
alias gk='\gitk --all --branches'
compdef _git gk='gitk'
# show complete history, with dangling commits
# Note: if the commit has been cleaned by 'git gc', the dangling
# commits older than 2 weeks may have been deleted
alias gke='\gitk --all $(git log -g --pretty=format:%h)'
compdef _git gke='gitk'
# Remove all .orig, .BASE.*, .REMOTE.*, .LOCAL.*, *.BACKUP files
alias gclean="find . -name '*.orig' -or -name '*.REMOTE.*' -or \
-name '*.LOCAL.*' -or -name '*.BACKUP.*' -or -name '*.BASE.*' | \
xargs $XARGS_OPTS rm -v"
# cd into the top of the current repository or submodule # cd into the top of the current repository or submodule
alias grt='cd $(git rev-parse --show-toplevel || echo ".")' alias grt='cd $(git rev-parse --show-toplevel || echo ".")'
# Git and svn mix # Git and svn mix