r/ChatGPTCoding • u/fuckme • Oct 11 '26
Resources And Tips [ Removed by moderator ]
[removed] — view removed post
0
Upvotes
r/ChatGPTCoding • u/fuckme • Oct 11 '26
[removed] — view removed post
•
u/ChatGPTCoding-ModTeam Oct 12 '26
This post or comment has been removed for the following reason:
Rule 5: No pure self-promotion / low-value project posts
Posts whose primary purpose is promoting a tool, product, service, GitHub repo, personal website, or blog belong in the weekly Self-Promotion thread. Delete the link: if nothing is left, it's an ad. Search for similar projects: if you can't tell why your project is better, it's a low-value project. GitHub links are fine. Personal website are not. Exception could be make for high quality posts. See also reddit's self-promotion guidelines.
You can read the full subreddit rules here: https://www.reddit.com/r/ChatGPTCoding/about/rules/
If you feel this removal was made unfairly, please contact the moderators through modmail.
1
u/ipreuss Oct 11 '26
Every worktree exists for a ticket. When the ticket gets closed, the worktree gets retired.
Why would you work any other way?
1
u/f3xjc Oct 11 '26
Yeah real problem, I have a daily cleanup for that, and there's like 5 different test that answer has this thing reached trunk? Yes/ no/ mostly.
As you said merge commit and squash have very different signature, but also inward merge with stacked pr.
Auto delete is fine if you have proof the thing reached trunk.
1
u/Right-Performance-93 Oct 11 '26
a merged pr is not the retire signal. i remove the worktree only when that folder is clean and its branch is already on main. a 48 hour timer will delete one an agent reopened overnight.
1
u/vladgladi Oct 11 '26
The rule that keeps this manageable: whoever creates the branch or worktree owns its cleanup, and that's written into the agent's instructions, not left to a human. The task isn't done until the worktree is removed and the branch is either merged or explicitly kept.
Then a dumb nightly check as a backstop: list local branches already merged into main and worktrees with no changes for a few days, and send the list to a human. Not auto-delete. An agent deleting branches unattended is how you lose the one with unpushed work in it.
The second part matters more than the first. Agents forget their own rules sometimes, the list doesn't.
1
u/BrookLi3 Oct 11 '26
One gotcha on the cleanup side:
git worktree removeonly checks for untracked files and modified tracked files, so anything gitignored in that folder, like a .env.local, a seeded local db, or a node_modules that took ten minutes to install, goes with it without a warning. I copy the env files in from the main checkout at worktree creation and have the cleanup script list what it's about to delete before it removes anything.1
u/Ctbhatia Oct 12 '26
worth knowing that git worktree prune only drops stale admin entries, it does not delete the folders, so the disk comes back from removing the directory first. a merged pr is not the retire signal either, clean folder plus branch already on main is.
-2
u/fuckme Oct 11 '26
I work on Assay and put together a walkthrough of what survives a merge, why it matters, and how to clean up safely:
Article · Video