From 6ef7d514862b877206066773ab4b36b470e9576f Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Sat, 25 Jul 2026 12:59:50 -0700 Subject: [PATCH] docs(faq): scope the worktree-lock advice to removal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lock was recommended "for worktrees containing precious ignored data (databases, caches, large assets)", which promises more than it delivers: it blocks removal and nothing else. An ignored file in a locked worktree is still replaced when commits arriving via `wt merge` or `wt step push` track a file at that path. Reproduced against this FAQ's own example — a locked worktree holding `db.sqlite` had it overwritten by the branch's tracked file, exit 0, no warning. That is git's own policy rather than a worktrunk quirk: a plain `git merge` there does the same, and only refuses when the colliding file is untracked rather than ignored. The opener now says what the lock actually buys. --- docs/content/faq.md | 2 +- plugins/worktrunk/skills/worktrunk/reference/faq.md | 2 +- skills/worktrunk/reference/faq.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/faq.md b/docs/content/faq.md index c10af37785..686ddfa72d 100644 --- a/docs/content/faq.md +++ b/docs/content/faq.md @@ -177,7 +177,7 @@ Worktrunk can delete **worktrees** and **branches**. Both have safeguards. `wt remove` mirrors `git worktree remove`: it refuses to remove worktrees with uncommitted changes (staged, modified, or untracked files). The `--force` flag removes the worktree anyway, discarding all of those changes. -For worktrees containing precious ignored data (databases, caches, large assets), use `git worktree lock`: +To protect a worktree from removal entirely (say it holds a local database), lock it: {{ terminal(cmd="git worktree lock ../myproject.feature --reason __WT_QUOT__Contains local database__WT_QUOT__") }} diff --git a/plugins/worktrunk/skills/worktrunk/reference/faq.md b/plugins/worktrunk/skills/worktrunk/reference/faq.md index 638c2004b7..830f71f01a 100644 --- a/plugins/worktrunk/skills/worktrunk/reference/faq.md +++ b/plugins/worktrunk/skills/worktrunk/reference/faq.md @@ -170,7 +170,7 @@ Worktrunk can delete **worktrees** and **branches**. Both have safeguards. `wt remove` mirrors `git worktree remove`: it refuses to remove worktrees with uncommitted changes (staged, modified, or untracked files). The `--force` flag removes the worktree anyway, discarding all of those changes. -For worktrees containing precious ignored data (databases, caches, large assets), use `git worktree lock`: +To protect a worktree from removal entirely (say it holds a local database), lock it: ```bash git worktree lock ../myproject.feature --reason "Contains local database" diff --git a/skills/worktrunk/reference/faq.md b/skills/worktrunk/reference/faq.md index 638c2004b7..830f71f01a 100644 --- a/skills/worktrunk/reference/faq.md +++ b/skills/worktrunk/reference/faq.md @@ -170,7 +170,7 @@ Worktrunk can delete **worktrees** and **branches**. Both have safeguards. `wt remove` mirrors `git worktree remove`: it refuses to remove worktrees with uncommitted changes (staged, modified, or untracked files). The `--force` flag removes the worktree anyway, discarding all of those changes. -For worktrees containing precious ignored data (databases, caches, large assets), use `git worktree lock`: +To protect a worktree from removal entirely (say it holds a local database), lock it: ```bash git worktree lock ../myproject.feature --reason "Contains local database"