]> git.rmz.io Git - dotfiles.git/blobdiff - zsh/aliases/git.zsh
zsh: better alias for `git stash list`
[dotfiles.git] / zsh / aliases / git.zsh
index a51ec1ec6747d9cf6611ea6f048a70481d8943a1..713564e9ef7266613f34b2d4154b09d8f5550bb7 100644 (file)
@@ -19,6 +19,7 @@ alias gc='git commit -v'
 alias gcs='git commit -v --squash'
 alias gcf='git commit -v --fixup'
 alias gca='git commit -v -a'
+alias gcaf='git commit -v -a --fixup'
 
 alias gco='git checkout'
 alias gcm='git checkout master'
@@ -27,7 +28,7 @@ alias gs='git stash save'
 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'
@@ -46,14 +47,15 @@ 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'
 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'
@@ -69,7 +71,7 @@ alias gpoat='git push origin --all && git push origin --tags'
 
 # 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'