bash: gc umgebaut

This commit is contained in:
Michael Grote 2021-12-27 12:25:57 +01:00
parent f77ccf6f3d
commit a2af7db0ef

View file

@ -134,9 +134,19 @@ function gcm {
# übergibt alle argumente an git commit -m als commit nachricht
git commit -m "$*"
}
function gcb {
# git checkout -b lokalername origin/remotename
git checkout -b $1 origin/$1
function gc {
case "$1" in
--help)
echo "git checkout <branch>"
echo "versucht erst einen lokalen checkout, danach von dem Remote-Repository"
echo "gc <branch>"
;;
"")
echo "Branch fehlt..."
;;
*)
git checkout $1 || git checkout -b $1 origin/$1
esac
}
@ -164,7 +174,6 @@ alias glast="git log -1 HEAD --stat"
alias gsp="git stage -p"
alias gd="git diff"
alias gs="git status"
alias gc="git checkout"
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
alias v="view"