summaryrefslogtreecommitdiff
path: root/plugins/git/git.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/git/git.plugin.zsh')
-rw-r--r--plugins/git/git.plugin.zsh23
1 files changed, 19 insertions, 4 deletions
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index d8ea3ae0c..9f7819df3 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -62,8 +62,10 @@ alias glgg='git log --graph --max-count=10'
compdef _git glgg=git-log
alias glgga='git log --graph --decorate --all'
compdef _git glgga=git-log
-alias glo='git log --oneline'
+alias glo='git log --oneline --decorate --color'
compdef _git glo=git-log
+alias glog='git log --oneline --decorate --color --graph'
+compdef _git glog=git-log
alias gss='git status -s'
compdef _git gss=git-status
alias ga='git add'
@@ -85,7 +87,11 @@ compdef _git gm=git-mergetool
alias gg='git gui citool'
alias gga='git gui citool --amend'
alias gk='gitk --all --branches'
+
alias gsts='git stash show --text'
+alias gsta='git stash'
+alias gstp='git stash pop'
+alias gstd='git stash drop'
# Will cd into the top of the current repository
# or submodule.
@@ -138,10 +144,19 @@ compdef _git glp=git-log
#
# This function return a warning if the current branch is a wip
function work_in_progress() {
- if $(git log -n 1 | grep -q -c wip); then
+ if $(git log -n 1 2>/dev/null | grep -q -c "\-\-wip\-\-"); then
echo "WIP!!"
fi
}
# these alias commit and uncomit wip branches
-alias gwip='git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m "wip"'
-alias gunwip='git log -n 1 | grep -q -c wip && git reset HEAD~1'
+alias gwip='git add -A; git ls-files --deleted -z | xargs -r0 git rm; git commit -m "--wip--"'
+alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
+
+# these alias ignore changes to file
+alias gignore='git update-index --assume-unchanged'
+alias gunignore='git update-index --no-assume-unchanged'
+# list temporarily ignored files
+alias gignored='git ls-files -v | grep "^[[:lower:]]"'
+
+
+