X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/b55d69396b587288c7e654035190d9e62fa70b71..4f4ac88afff1c5a331c5f50b2b9e1af005c0ae93:/zsh/aliases/git.zsh diff --git a/zsh/aliases/git.zsh b/zsh/aliases/git.zsh index 154aa6d..d487d61 100644 --- a/zsh/aliases/git.zsh +++ b/zsh/aliases/git.zsh @@ -3,6 +3,8 @@ alias g='git' compdef g=git alias gst='git status' compdef _git gst=git-status +alias gsts='git status -s' +compdef _git gsts=git-status alias gl='git pull' compdef _git gl=git-pull alias gup='git pull --rebase' @@ -10,15 +12,30 @@ compdef _git gup=git-fetch alias gp='git push' compdef _git gp=git-push alias gd='git diff' -gdv() { git diff -w "$@" | view - } -compdef _git gdv=git-diff +alias gdc='git diff --cached' alias gc='git commit -v' compdef _git gc=git-commit +alias gcs='git commit -v --squash' +compdef _git gcs=git-commit +alias gcf='git commit -v --fixup' +compdef _git gcf=git-commit alias gca='git commit -v -a' compdef _git gca=git-commit alias gco='git checkout' compdef _git gco=git-checkout alias gcm='git checkout master' +alias gs='git stash save' +compdef _git gs=git-stash +alias gsa='git stash apply' +compdef _git gsa=git-stash +alias gsp='git stash pop' +compdef _git gsp=git-stash +alias gsd='git stash drop' +compdef _git gsd=git-stash +alias gsl='git --no-pager stash list' +compdef _git gsl=git-stash +alias gss='git stash show --patch' +compdef _git gss=git-stash alias gr='git remote' compdef _git gr=git-remote alias grv='git remote -v' @@ -35,19 +52,22 @@ alias gb='git branch' compdef _git gb=git-branch alias gba='git branch -a' compdef _git gba=git-branch +alias gbm='git branch --merged' +alias gbdm='git branch --merged | grep -ve "\*" -e "master" | xargs -n 1 git branch -d' alias gcount='git shortlog -sn' compdef gcount=git alias gcl='git config --list' alias gcp='git cherry-pick' compdef _git gcp=git-cherry-pick -alias glg='git log --stat --max-count=5' +alias glg='git --no-pager log --oneline --graph --max-count=20 --decorate' +alias glg='git --no-pager log --graph --max-count=20 --pretty=tformat:"%Cblue%cd %C(auto)%h%d %s" --date=short' compdef _git glg=git-log -alias glgg='git log --graph --max-count=5' +alias glgl='git log --graph --pretty=tformat:"%Cblue%cd %C(auto)%h%d %s" --date=short' +compdef _git glgl=git-log +alias glgg='git log --stat --graph --max-count=20 --decorate' compdef _git glgg=git-log -alias glgga='git log --graph --decorate --all' +alias glgga='git log --stat --graph --decorate --all' compdef _git glgga=git-log -alias gss='git status -s' -compdef _git gss=git-status alias ga='git add' compdef _git ga=git-add alias gm='git merge'