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
Conversation
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>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
_workspacehack: bare repo stays properly bare (core.bare=true), no phantom branches in prompts orgit worktree listwt-addsupports existing branches: detects local and remote tracking branches instead of always failing with-bwt-rmcleans up fully: deletes the local branch after removing the worktree, warns on unmerged changes, refuses to removemainremote-addis safer: errors on duplicate remote names, no longer auto-pushesTest plan
uvx copier copy --trust <path> <dest> --defaultsgit worktree listshows(bare)for.bare/_workspacebranch existswt-addcreates new branches, checks out existing local branches, and checks out remote brancheswt-rmremoves worktree + branch, warns on unmerged changes, blocksmainremovalremote-adderrors on existing remote name🤖 Generated with Claude Code