Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

fix: remove rough edges in scaffolded projects - #4

Merged
davidpoblador merged 5 commits into
mainfrom
fix/rough-edges
Feb 6, 2026
Merged

fix: remove rough edges in scaffolded projects#4
davidpoblador merged 5 commits into
mainfrom
fix/rough-edges

Conversation

@davidpoblador

Copy link
Copy Markdown
Member

Summary

  • Remove _workspace hack: bare repo stays properly bare (core.bare=true), no phantom branches in prompts or git worktree list
  • wt-add supports existing branches: detects local and remote tracking branches instead of always failing with -b
  • wt-rm cleans up fully: deletes the local branch after removing the worktree, warns on unmerged changes, refuses to remove main
  • remote-add is safer: errors on duplicate remote names, no longer auto-pushes
  • AGENTS.md updated: documents the root as a container, not a working directory

Test plan

  • Scaffold a fresh project with uvx copier copy --trust <path> <dest> --defaults
  • Verify git worktree list shows (bare) for .bare/
  • Verify no _workspace branch exists
  • Test wt-add creates new branches, checks out existing local branches, and checks out remote branches
  • Test wt-rm removes worktree + branch, warns on unmerged changes, blocks main removal
  • Test remote-add errors on existing remote name

🤖 Generated with Claude Code

davidpoblador and others added 5 commits February 6, 2026 13:19
The project root no longer pretends to be a working directory. The bare
repo stays bare (core.bare=true), HEAD points to main, and git status
correctly reports "this operation must be run in a work tree" at the root.

Removes the orphan _workspace branch, core.bare=false override, and the
root .gitignore wildcard that were only needed to fake a clean status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously always used -b, failing if the branch existed. Now checks
for existing local branches and remote tracking branches before falling
back to creating a new branch from base.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Now deletes the local branch after removing the worktree. If the branch
has unmerged changes, warns the user and shows the force-delete command
instead of silently dropping work. Refuses to remove the main worktree.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Now errors if the remote name already exists (showing current URL and
how to replace it). No longer pushes main automatically; instead prints
the push command so the user stays in control.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove references to _workspace branch and root .gitignore. Document
that the project root is a container (not a working directory) and that
git commands should be run from inside worktrees.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@davidpoblador
davidpoblador merged commit 3ae78d9 into main Feb 6, 2026
@davidpoblador
davidpoblador deleted the fix/rough-edges branch February 6, 2026 12:24
@davidpoblador davidpoblador changed the title Fix rough edges in scaffolded projects fix: remove rough edges in scaffolded projects Feb 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant