Worktrees by default: setup checks out the default branch as the first worktree - #11
Merged
Merged
Conversation
setup.sh fetches each repo into a bare store at worktrees/<repo>/.bare and checks out the default branch as worktrees/<repo>/<default-branch>/; no more repos/ clone. new-worktree.sh makes worktrees/<repo>/<branch> from that store (existing origin branches now track origin). Template, Argos defaults, argos-dev copies, README, design, goals, and e2e tests updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01818NEiW3BJCTrVCTDgaYDf
setup.sh stores each repo bare in repos/<name> and checks out the default branch as the first worktree, worktrees/<name>/<default-branch> (re-created if missing; an older plain clone in repos/ gets a warning). Both dirs excluded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01818NEiW3BJCTrVCTDgaYDf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
.delphi/setup.shnow creates a worktree for each repo's default branch.repos/stays as the repo store, and every checkout lives inworktrees/. Both are git-ignored through.git/info/exclude.repos/<repo>: a bare store with no files, fetched from theworkspace.ymlURL.worktrees/<repo>/<default-branch>/: the first worktree, created by setup (for Argos:worktrees/argos/develop/). A re-run re-creates it if it's missing..delphi/new-worktree.sh: createsworktrees/<repo>/<branch>fromrepos/<repo>. Existing origin branches now trackorigin/<branch>.defaults/, and argos-dev copies of the scripts,CLAUDE.md, and thenew-worktreeskill, plus argos-dev'simplementskill,README.md,docs/design.md, anddocs/goals.md.tests/e2e.sh: adds checks for the bare store, the default worktree (including restoring it), both excludes, and an older plain clone.Migration
An existing
repos/<repo>that is a plain clone is kept. Setup warns that it can't check out the default branch, because that branch is already checked out in the plain clone. Re-clone it with setup to switch to the new layout.Checks
bash tests/e2e.shpasses all 36 checks, including shellcheck.ci/check.shis OK.Note: #10 adds skills that mention
repos/argos/. Whichever PR merges second needs those paths updated toworktrees/argos/develop/.🤖 Generated with Claude Code
https://claude.ai/code/session_01818NEiW3BJCTrVCTDgaYDf