alias gdc='git diff --cached'
function gdm { gd "${1:-origin}".. }
compdef _git gdm=git-diff
+function gdf { gd $(git merge-base --fork-point $1) }
+compdef _git gdf=git-diff
alias gc='git commit -v'
alias gcs='git commit -v --squash'
alias gsa='git stash apply'
alias gsp='git stash pop'
alias gsd='git stash drop'
-alias gsl='git --no-pager stash list'
+alias gsl='git --no-pager log -g --oneline --pretty=tformat:"%gd %Cblue%cd %C(auto)%h %s" stash@{0} --date=short'
alias gss='git stash show --patch'
alias gr='git remote'
alias grset='git remote set-url'
alias grup='git remote update'
-alias gb='git branch -vv'
-alias gba='git branch -a'
-alias gbm='git branch --merged'
-alias gbdm='git branch --merged | grep -ve "\*" -e "master" | xargs git branch -d'
+alias gb='git --no-pager branch -vv'
+alias gbv='git --no-pager branch -vv'
+alias gba='git --no-pager branch -a'
+alias gbm='git --no-pager branch -vv --merged'
+alias gbdm='git branch --merged | grep -ve "\*" -e "\+" -e "master" | xargs git branch -d'
+alias gsu='git branch --set-upstream-to'
+alias gsum='git branch --set-upstream-to=origin/HEAD'
+
+alias gwl='git worktree list'
+function gwa { git worktree add wt/$1 $1 }
+compdef _git gwa='_git_commits'
alias gcl='git config --list'
alias gcp='git cherry-pick'
alias gcount='git shortlog -sn'
-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'
+alias glg='git --no-pager log --graph --max-count=20 --format="%Cblue%cd %C(auto)%h%d %s" --date=short'
+alias glg2='git --no-pager log --graph --max-count=20 --date=short --format="%C(blue)%cd %C(auto)%h %C(dim cyan)%an %C(bold green)(%ar)%C(auto)%-d%n %s"'
function glm { glg "${1:-origin}".. }
compdef _git glm=git-log
-alias glgl='git log --graph --pretty=tformat:"%Cblue%cd %C(auto)%h%d %s" --date=short'
+alias glgl='git log --graph --cherry-mark --boundary --pretty=tformat:"%Cblue%cd %C(auto)%h%d %s" --date=short'
alias glgg='git log --stat --graph --max-count=20 --decorate'
alias glgga='git log --stat --graph --decorate --all'
+alias grl='git --no-pager reflog --max-count=20'
+
alias ga='git add'
alias gm='git merge'