alias: gsp neu
This commit is contained in:
parent
b1722c614a
commit
ef2150c011
1 changed files with 28 additions and 1 deletions
29
.bash_extra
29
.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 <<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
|
||||
# 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
|
||||
|
|
Loading…
Reference in a new issue