From 9e905dc56aa678ab30cb10d3c0e8b53f4232c345 Mon Sep 17 00:00:00 2001 From: klaas Date: Tue, 24 Sep 2024 16:57:03 +0200 Subject: [PATCH] =?UTF-8?q?skripte=20eingef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 commands 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 +}