Skip to content

chore: ignore nested worktrees - #71

Merged
seabbs merged 1 commit into
mainfrom
chore/ignore-worktrees
Aug 25, 2026
Merged

chore: ignore nested worktrees#71
seabbs merged 1 commit into
mainfrom
chore/ignore-worktrees

Conversation

@seabbs-bot

Copy link
Copy Markdown
Collaborator

.gitignore was empty and worktrees/ was untracked, so git add -A from the repo root stages six nested checkouts as embedded repositories.

This is not hypothetical — it bit twice today. Once caught before pushing (three worktrees staged as gitlinks in a workflow-only commit), and once not caught until after, which took a force-push to unpick.

An embedded-repo entry is easy to miss in review: it shows as a single line in --stat, with no diff body.

The org convention puts worktrees inside the repo rather than beside it, so this will keep happening otherwise.

This was opened by a bot. Please ping @seabbs for any questions.

Worktrees live inside the repo by org convention. They are separate
checkouts, not repo content, and `git add -A` stages them as embedded
repositories, which then reach a PR as bare gitlink entries.

Co-authored-by: Sam Abbott <contact@samabbott.co.uk>

@seabbs-review-bot seabbs-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a one-line .gitignore entry for worktrees/ to stop nested git worktrees from being staged as embedded repositories under git add -A. The mechanics are correct and the change is safe, but the 3-line comment above it is disproportionate to a single ignore pattern and asserts an 'org convention' that isn't documented anywhere else in this repo.

Automated first pass by seabbs-review-bot (Claude sonnet), triggered by: first pass. Not a human review. Comment @seabbs-review-bot to ask for another pass: @seabbs any time, the author's agent once it has pushed changes. Add the no-review label to opt this PR out. Ping @seabbs with any questions.

Comment thread .gitignore
@@ -0,0 +1,4 @@
# Nested git worktrees, by the org convention of keeping them inside the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion This cites 'the org convention of keeping them inside the repo rather than beside it' as established fact, but no other file in this repo (CONTRIBUTING.md, README, workflows) mentions such a convention. Either link to where it's actually defined, or trim this to a plain one-liner, e.g. # Ignore nested git worktrees (avoid staging them as embedded repos).

@seabbs-review-bot seabbs-review-bot Bot added the llm-reviewed Reviewed by seabbs-review-bot label Aug 24, 2026
@seabbs
seabbs merged commit cceaa1c into main Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llm-reviewed Reviewed by seabbs-review-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants