Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
docs(tips): configure origin fetch refspec in the bare repository layout (#4323)
Worktrunk Bote0d6ecea4fbb
diff --git a/docs/src/content/docs/tips-patterns.md b/docs/src/content/docs/tips-patterns.mdindex 7b34d25bf..afcac31e1 100644--- a/docs/src/content/docs/tips-patterns.md+++ b/docs/src/content/docs/tips-patterns.md@@ -63,8 +63,13 @@ Cloning a bare repo into `<project>/.git` puts all worktrees under one directory```bashgit clone --bare <url> myproject/.gitcd myproject+git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'+git fetch origin+git remote set-head origin --auto```+`git clone --bare` records the `origin` URL but no fetch refspec, so without the `git config` line `git fetch` never creates remote-tracking branches like `origin/main`, and tools that read them (lazygit, editor integrations) see no remote branches. `git remote set-head` then points `origin/HEAD` at the remote's default branch.+With `worktree-path = "{{ repo_path }}/../{{ branch | sanitize }}"`, worktrees become subdirectories of `myproject/`:```diff --git a/plugins/worktrunk/skills/worktrunk/reference/tips-patterns.md b/plugins/worktrunk/skills/worktrunk/reference/tips-patterns.mdindex b2f6ea45a..6446e1daa 100644--- a/plugins/worktrunk/skills/worktrunk/reference/tips-patterns.md+++ b/plugins/worktrunk/skills/worktrunk/reference/tips-patterns.md@@ -59,8 +59,13 @@ Cloning a bare repo into `<project>/.git` puts all worktrees under one directory```bashgit clone --bare <url> myproject/.gitcd myproject+git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'+git fetch origin+git remote set-head origin --auto```+`git clone --bare` records the `origin` URL but no fetch refspec, so without the `git config` line `git fetch` never creates remote-tracking branches like `origin/main`, and tools that read them (lazygit, editor integrations) see no remote branches. `git remote set-head` then points `origin/HEAD` at the remote's default branch.+With `worktree-path = "{{ repo_path }}/../{{ branch | sanitize }}"`, worktrees become subdirectories of `myproject/`:```diff --git a/skills/worktrunk/reference/tips-patterns.md b/skills/worktrunk/reference/tips-patterns.mdindex b2f6ea45a..6446e1daa 100644--- a/skills/worktrunk/reference/tips-patterns.md+++ b/skills/worktrunk/reference/tips-patterns.md@@ -59,8 +59,13 @@ Cloning a bare repo into `<project>/.git` puts all worktrees under one directory```bashgit clone --bare <url> myproject/.gitcd myproject+git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'+git fetch origin+git remote set-head origin --auto```+`git clone --bare` records the `origin` URL but no fetch refspec, so without the `git config` line `git fetch` never creates remote-tracking branches like `origin/main`, and tools that read them (lazygit, editor integrations) see no remote branches. `git remote set-head` then points `origin/HEAD` at the remote's default branch.+With `worktree-path = "{{ repo_path }}/../{{ branch | sanitize }}"`, worktrees become subdirectories of `myproject/`:```