diff --git a/.bash_extra b/.bash_extra index 7d2bda1..732bc25 100644 --- a/.bash_extra +++ b/.bash_extra @@ -190,6 +190,34 @@ EOF (echo ">>> Try remote checkout" && git checkout --quiet -b "$1" origin/"$1" > /dev/null 2>&1 || echo ">>> Unkown branch!") esac } +function gsp { + case "$1" in + "") + git stage -p + ;; + --help | -h) + cat < + +Options: + -h, --help Prints this help. + +Author: + michael.grote@posteo.de - git.mgrote.net +EOF + ;; + *) + git stage -p && git commit -m "$*" + ;; + esac +} ### Aliase # tmux alias tmuxa="tmux a -t " @@ -218,7 +246,6 @@ alias gp="git stash && git pull && git stash pop" alias gf="git fetch" alias gdel="git add . && git stash && git stash clear" alias glast="git log -1 HEAD --stat" -alias gsp="git stage -p" alias gd="git diff" alias glogs="git log --all --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" # vim