feat(git): add clone-worktree alias

main
mandlm 2022-07-11 08:37:12 +02:00
parent c7cb38ad3c
commit cea45c27fd
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,8 @@
}; };
aliases = { aliases = {
identity = "! git config user.name \"$(git config user.$1.name)\"; git config user.email \"$(git config user.$1.email)\"; git config user.signingkey \"$(git config user.$1.signingkey)\"; git config commit.gpgsign \"true\"; :"; identity = ''! git config user.name "$(git config user.$1.name)"; git config user.email "$(git config user.$1.email)"; git config user.signingkey "$(git config user.$1.signingkey)"; git config commit.gpgsign "true"; : '';
clone-worktree = ''! mkdir $2; git clone $1 $2/.base; BRANCH=`git -C $2/.base symbolic-ref --short HEAD`; echo "branch is $BRANCH"; git -C $2/.base checkout --detach HEAD; git -C $2/.base worktree add ../$BRANCH; :'';
}; };
ignores = [ ignores = [