bugfixed the git aliase

This commit is contained in:
pika 2024-10-05 15:16:42 +02:00
parent 7a7977706e
commit a910ed3d33

12
.zshrc
View file

@ -335,13 +335,25 @@ drweb() {
alias gm='git checkout main && git merge' alias gm='git checkout main && git merge'
alias gc="git clone --recurse-submodule" alias gc="git clone --recurse-submodule"
gcl() { gcl() {
if [ -z "$2" ]; then
git clone --depth=1 "https://github.com/$1" git clone --depth=1 "https://github.com/$1"
else
git clone --depth=1 "https://github.com/$1" "$2"
fi
} }
gck() { gck() {
if [ -z "$2" ]; then
git clone --recurse-submodules --depth=1 "https://git.k4li.de/$1" git clone --recurse-submodules --depth=1 "https://git.k4li.de/$1"
else
git clone --recurse-submodules --depth=1 "https://git.k4li.de/$1" "$2"
fi
} }
gcs() { gcs() {
if [ -z "$2" ]; then
git clone --recurse-submodules --depth=1 "git@git.k4li.de:$1" git clone --recurse-submodules --depth=1 "git@git.k4li.de:$1"
else
git clone --recurse-submodules --depth=1 "git@git.k4li.de:$1" "$2"
fi
} }
alias gd="git diff" alias gd="git diff"
alias ga="gd $1 && git add" alias ga="gd $1 && git add"