From b385199e1774c1b8adad73ac9fa1f3a34d3abd8c Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Fri, 28 Apr 2023 15:42:38 +0200 Subject: switch to bare repos --- home.nix | 4 ++++ shell-scripts/azdo-switch-project | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/home.nix b/home.nix index eb92041..7733234 100644 --- a/home.nix +++ b/home.nix @@ -57,6 +57,10 @@ enable = true; userName = "Mike Vink"; userEmail = email; + extraConfig = { + worktree.guessRemote = true; + remote.origin.fetch = "+refs/heads/*:refs/remotes/origin/*"; + }; ignores = [ "/.direnv/" "/.envrc" diff --git a/shell-scripts/azdo-switch-project b/shell-scripts/azdo-switch-project index 50b97d6..2889e62 100644 --- a/shell-scripts/azdo-switch-project +++ b/shell-scripts/azdo-switch-project @@ -25,9 +25,9 @@ curl -s -H '$AUTH_HEADER' $WORK_AZDO_GIT_ORG_URL/{}$LIST_REPOSITORIES \ | fzf) DEST_DIR="$GIT_DIR/$(echo $PROJECT | cut -d '/' -f3)" -if [ ! -d $DEST_DIR ] +if [ ! -d $DEST_DIR ] then - git clone $WORK_AZDO_GIT_ORG_URL/$PROJECT $DEST_DIR + git clone --bare $WORK_AZDO_GIT_ORG_URL/$PROJECT $DEST_DIR fi cd $DEST_DIR $EDITOR -- cgit v1.2.3