# mkcdir
# Erstellt einen Ordner und wechselt hinein

mkcdir()
{
mkdir -p -- "$1" &&
	cd -P -- "$1"
}


# Doch
# führt den letzten Befehl noch einmal als sudo aus
# zsh:
alias doch='sudo $(fc -ln -1)'
#bash:
alias doch='sudo $(history -p !-1)'


# newgit
# legt neues Repository an und pusht zu Server
newgit()
{
mkcdir "$1" &&
git init &&
git checkout -b main &&
touch README.md &&
git add . &&
git commit -a -m "initial commit" &&
git remote add origin https://git.boergmann.it/klaas/"$1".git &&
git push -u origin main
}


#gitclone
# eigenes repository clonen
gitclone()
{
git clone https://git.boergmann.it/klaas/"$1".git &&
cd "$1"
}