]> git.rmz.io Git - dotfiles.git/blobdiff - zsh/aliases/git.zsh
vim: unindent terminating `)`
[dotfiles.git] / zsh / aliases / git.zsh
index efd03d0b4775e2d4ca12a601497216a2d001e566..e8cd9f09690cd3f30fe6e840066ec283b89f4b88 100644 (file)
@@ -8,9 +8,12 @@ alias gl='git pull'
 alias gup='git pull --rebase'
 
 alias gp='git push'
 alias gup='git pull --rebase'
 
 alias gp='git push'
+alias gpf='git push --force-with-lease'
 
 alias gd='git diff'
 alias gdc='git diff --cached'
 
 alias gd='git diff'
 alias gdc='git diff --cached'
+function gdm { gd "${1:-origin}".. }
+compdef _git gdm=git-diff
 
 alias gc='git commit -v'
 alias gcs='git commit -v --squash'
 
 alias gc='git commit -v'
 alias gcs='git commit -v --squash'
@@ -45,6 +48,8 @@ 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 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'
+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 glgg='git log --stat --graph --max-count=20 --decorate'
 alias glgga='git log --stat --graph --decorate --all'
 alias glgl='git log --graph --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'
@@ -64,7 +69,7 @@ alias gpoat='git push origin --all && git push origin --tags'
 
 # 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 cdr='cd $(git rev-parse --show-toplevel || echo ".")'
 
 # Git and svn mix
 alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
 
 # Git and svn mix
 alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'