1
0
Fork 0

Added option to skip git aliases definition

Fixes #947
pull/948/head
Eduardo San Martin Morote 9 years ago
parent f2a826e963
commit f6ae9cd66e

@ -29,6 +29,10 @@ This setting affects all aliases and functions that call `git-status`.
Aliases Aliases
------- -------
Aliases are enabled by default. You can disable them with:
zstyle ':prezto:module:git:alias' skip 'yes'
### Git ### Git
- `g` is short for `git`. - `g` is short for `git`.

@ -26,156 +26,161 @@ zstyle -s ':prezto:module:git:status:ignore' submodules '_git_status_ignore_subm
# Aliases # Aliases
# #
# Git zstyle -s ':prezto:module:git:alias' skip '_git_alias_skip' \
alias g='git' || _git_alias_skip='no'
# Branch (b) if [[ "$_git_alias_skip" = no ]]; then
alias gb='git branch' # Git
alias gbc='git checkout -b' alias g='git'
alias gbl='git branch -v'
alias gbL='git branch -av' # Branch (b)
alias gbx='git branch -d' alias gb='git branch'
alias gbX='git branch -D' alias gbc='git checkout -b'
alias gbm='git branch -m' alias gbl='git branch -v'
alias gbM='git branch -M' alias gbL='git branch -av'
alias gbs='git show-branch' alias gbx='git branch -d'
alias gbS='git show-branch -a' alias gbX='git branch -D'
alias gbm='git branch -m'
# Commit (c) alias gbM='git branch -M'
alias gc='git commit --verbose' alias gbs='git show-branch'
alias gca='git commit --verbose --all' alias gbS='git show-branch -a'
alias gcm='git commit --message'
alias gco='git checkout' # Commit (c)
alias gcO='git checkout --patch' alias gc='git commit --verbose'
alias gcf='git commit --amend --reuse-message HEAD' alias gca='git commit --verbose --all'
alias gcF='git commit --verbose --amend' alias gcm='git commit --message'
alias gcp='git cherry-pick --ff' alias gco='git checkout'
alias gcP='git cherry-pick --no-commit' alias gcO='git checkout --patch'
alias gcr='git revert' alias gcf='git commit --amend --reuse-message HEAD'
alias gcR='git reset "HEAD^"' alias gcF='git commit --verbose --amend'
alias gcs='git show' alias gcp='git cherry-pick --ff'
alias gcl='git-commit-lost' alias gcP='git cherry-pick --no-commit'
alias gcr='git revert'
# Conflict (C) alias gcR='git reset "HEAD^"'
alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"' alias gcs='git show'
alias gCa='git add $(gCl)' alias gcl='git-commit-lost'
alias gCe='git mergetool $(gCl)'
alias gCo='git checkout --ours --' # Conflict (C)
alias gCO='gCo $(gCl)' alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"'
alias gCt='git checkout --theirs --' alias gCa='git add $(gCl)'
alias gCT='gCt $(gCl)' alias gCe='git mergetool $(gCl)'
alias gCo='git checkout --ours --'
# Data (d) alias gCO='gCo $(gCl)'
alias gd='git ls-files' alias gCt='git checkout --theirs --'
alias gdc='git ls-files --cached' alias gCT='gCt $(gCl)'
alias gdx='git ls-files --deleted'
alias gdm='git ls-files --modified' # Data (d)
alias gdu='git ls-files --other --exclude-standard' alias gd='git ls-files'
alias gdk='git ls-files --killed' alias gdc='git ls-files --cached'
alias gdi='git status --porcelain --short --ignored | sed -n "s/^!! //p"' alias gdx='git ls-files --deleted'
alias gdm='git ls-files --modified'
# Fetch (f) alias gdu='git ls-files --other --exclude-standard'
alias gf='git fetch' alias gdk='git ls-files --killed'
alias gfc='git clone' alias gdi='git status --porcelain --short --ignored | sed -n "s/^!! //p"'
alias gfm='git pull'
alias gfr='git pull --rebase' # Fetch (f)
alias gf='git fetch'
# Grep (g) alias gfc='git clone'
alias gg='git grep' alias gfm='git pull'
alias ggi='git grep --ignore-case' alias gfr='git pull --rebase'
alias ggl='git grep --files-with-matches'
alias ggL='git grep --files-without-matches' # Grep (g)
alias ggv='git grep --invert-match' alias gg='git grep'
alias ggw='git grep --word-regexp' alias ggi='git grep --ignore-case'
alias ggl='git grep --files-with-matches'
# Index (i) alias ggL='git grep --files-without-matches'
alias gia='git add' alias ggv='git grep --invert-match'
alias giA='git add --patch' alias ggw='git grep --word-regexp'
alias giu='git add --update'
alias gid='git diff --no-ext-diff --cached' # Index (i)
alias giD='git diff --no-ext-diff --cached --word-diff' alias gia='git add'
alias gir='git reset' alias giA='git add --patch'
alias giR='git reset --patch' alias giu='git add --update'
alias gix='git rm -r --cached' alias gid='git diff --no-ext-diff --cached'
alias giX='git rm -rf --cached' alias giD='git diff --no-ext-diff --cached --word-diff'
alias gir='git reset'
# Log (l) alias giR='git reset --patch'
alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"' alias gix='git rm -r --cached'
alias gls='git log --topo-order --stat --pretty=format:"${_git_log_medium_format}"' alias giX='git rm -rf --cached'
alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:"${_git_log_medium_format}"'
alias glo='git log --topo-order --pretty=format:"${_git_log_oneline_format}"' # Log (l)
alias glg='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_format}"' alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"'
alias glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"' alias gls='git log --topo-order --stat --pretty=format:"${_git_log_medium_format}"'
alias glc='git shortlog --summary --numbered' alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:"${_git_log_medium_format}"'
alias glo='git log --topo-order --pretty=format:"${_git_log_oneline_format}"'
# Merge (m) alias glg='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_format}"'
alias gm='git merge' alias glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"'
alias gmC='git merge --no-commit' alias glc='git shortlog --summary --numbered'
alias gmF='git merge --no-ff'
alias gma='git merge --abort' # Merge (m)
alias gmt='git mergetool' alias gm='git merge'
alias gmC='git merge --no-commit'
# Push (p) alias gmF='git merge --no-ff'
alias gp='git push' alias gma='git merge --abort'
alias gpf='git push --force' alias gmt='git mergetool'
alias gpa='git push --all'
alias gpA='git push --all && git push --tags' # Push (p)
alias gpt='git push --tags' alias gp='git push'
alias gpc='git push --set-upstream origin "$(git-branch-current 2> /dev/null)"' alias gpf='git push --force'
alias gpp='git pull origin "$(git-branch-current 2> /dev/null)" && git push origin "$(git-branch-current 2> /dev/null)"' alias gpa='git push --all'
alias gpA='git push --all && git push --tags'
# Rebase (r) alias gpt='git push --tags'
alias gr='git rebase' alias gpc='git push --set-upstream origin "$(git-branch-current 2> /dev/null)"'
alias gra='git rebase --abort' alias gpp='git pull origin "$(git-branch-current 2> /dev/null)" && git push origin "$(git-branch-current 2> /dev/null)"'
alias grc='git rebase --continue'
alias gri='git rebase --interactive' # Rebase (r)
alias grs='git rebase --skip' alias gr='git rebase'
alias gra='git rebase --abort'
# Remote (R) alias grc='git rebase --continue'
alias gR='git remote' alias gri='git rebase --interactive'
alias gRl='git remote --verbose' alias grs='git rebase --skip'
alias gRa='git remote add'
alias gRx='git remote rm' # Remote (R)
alias gRm='git remote rename' alias gR='git remote'
alias gRu='git remote update' alias gRl='git remote --verbose'
alias gRp='git remote prune' alias gRa='git remote add'
alias gRs='git remote show' alias gRx='git remote rm'
alias gRb='git-hub-browse' alias gRm='git remote rename'
alias gRu='git remote update'
# Stash (s) alias gRp='git remote prune'
alias gs='git stash' alias gRs='git remote show'
alias gsa='git stash apply' alias gRb='git-hub-browse'
alias gsx='git stash drop'
alias gsX='git-stash-clear-interactive' # Stash (s)
alias gsl='git stash list' alias gs='git stash'
alias gsL='git-stash-dropped' alias gsa='git stash apply'
alias gsd='git stash show --patch --stat' alias gsx='git stash drop'
alias gsp='git stash pop' alias gsX='git-stash-clear-interactive'
alias gsr='git-stash-recover' alias gsl='git stash list'
alias gss='git stash save --include-untracked' alias gsL='git-stash-dropped'
alias gsS='git stash save --patch --no-keep-index' alias gsd='git stash show --patch --stat'
alias gsw='git stash save --include-untracked --keep-index' alias gsp='git stash pop'
alias gsr='git-stash-recover'
# Submodule (S) alias gss='git stash save --include-untracked'
alias gS='git submodule' alias gsS='git stash save --patch --no-keep-index'
alias gSa='git submodule add' alias gsw='git stash save --include-untracked --keep-index'
alias gSf='git submodule foreach'
alias gSi='git submodule init' # Submodule (S)
alias gSI='git submodule update --init --recursive' alias gS='git submodule'
alias gSl='git submodule status' alias gSa='git submodule add'
alias gSm='git-submodule-move' alias gSf='git submodule foreach'
alias gSs='git submodule sync' alias gSi='git submodule init'
alias gSu='git submodule foreach git pull origin master' alias gSI='git submodule update --init --recursive'
alias gSx='git-submodule-remove' alias gSl='git submodule status'
alias gSm='git-submodule-move'
# Working Copy (w) alias gSs='git submodule sync'
alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short' alias gSu='git submodule foreach git pull origin master'
alias gwS='git status --ignore-submodules=${_git_status_ignore_submodules}' alias gSx='git-submodule-remove'
alias gwd='git diff --no-ext-diff'
alias gwD='git diff --no-ext-diff --word-diff' # Working Copy (w)
alias gwr='git reset --soft' alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short'
alias gwR='git reset --hard' alias gwS='git status --ignore-submodules=${_git_status_ignore_submodules}'
alias gwc='git clean -n' alias gwd='git diff --no-ext-diff'
alias gwC='git clean -f' alias gwD='git diff --no-ext-diff --word-diff'
alias gwx='git rm -r' alias gwr='git reset --soft'
alias gwX='git rm -rf' alias gwR='git reset --hard'
alias gwc='git clean -n'
alias gwC='git clean -f'
alias gwx='git rm -r'
alias gwX='git rm -rf'
fi

Loading…
Cancel
Save