diff --git a/commands b/commands new file mode 100644 index 0000000..988b6ee --- /dev/null +++ b/commands @@ -0,0 +1,31 @@ +# 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 +}