summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Vink <mike.vink@stater.nl>2023-04-28 15:42:38 +0200
committerMike Vink <mike.vink@stater.nl>2023-04-28 15:42:38 +0200
commitb385199e1774c1b8adad73ac9fa1f3a34d3abd8c (patch)
treefa3c5121a4664a5c134bd4b42e16ff1f1cb6f224
parentbe341302350312608ddd44f490a90f3583b8999e (diff)
switch to bare repos
-rw-r--r--home.nix4
-rw-r--r--shell-scripts/azdo-switch-project4
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