alias: gsp neu

This commit is contained in:
Michael Grote 2022-08-30 07:18:15 +02:00
parent b1722c614a
commit ef2150c011

View file

@ -190,6 +190,34 @@ EOF
(echo ">>> Try remote checkout" && git checkout --quiet -b "$1" origin/"$1" > /dev/null 2>&1 || echo ">>> Unkown branch!") (echo ">>> Try remote checkout" && git checkout --quiet -b "$1" origin/"$1" > /dev/null 2>&1 || echo ">>> Unkown branch!")
esac esac
} }
function gsp {
case "$1" in
"")
git stage -p
;;
--help | -h)
cat <<EOF
Description:
"git stage -p" + "git commit" combined
without parameter only "gsp" is called,
if '$1' is set; "gcm" is called too
Usage:
gsp [--help] <message>
Options:
-h, --help Prints this help.
Author:
michael.grote@posteo.de - git.mgrote.net
EOF
;;
*)
git stage -p && git commit -m "$*"
;;
esac
}
### Aliase ### Aliase
# tmux # tmux
alias tmuxa="tmux a -t " alias tmuxa="tmux a -t "
@ -218,7 +246,6 @@ alias gp="git stash && git pull && git stash pop"
alias gf="git fetch" alias gf="git fetch"
alias gdel="git add . && git stash && git stash clear" alias gdel="git add . && git stash && git stash clear"
alias glast="git log -1 HEAD --stat" alias glast="git log -1 HEAD --stat"
alias gsp="git stage -p"
alias gd="git diff" 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" 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 # vim