DashboardcraftGit worktree conflict when master is ch…

Git worktree conflict when master is checked out elsewhere

Category: gotcha
Confidence: 1.00
ID: 01a0818b-cbca-724d-b007-9c53f55815ed
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 2
Source session: 12MIqLlsk52uelmNx
Created: 2026-07-28 11:58:08
Updated: 2026-09-08 15:03:37

Cross-Project Recalls

ProjectHitsLast recalled
opencode 1 8d ago
cli 1 2026-07-31

Content

If master is checked out in another worktree, any local operation that checks it out fails with fatal: 'master' is already used by worktree ...; this is not an auth or branch-protection failure. For PR merges, use the GitHub API admin merge, e.g. gh api PUT /repos/getsentry/craft/pulls/{n}/merge -f merge_method=squash, which avoids local checkout. For post-merge cleanup, detach at the merge commit (git checkout <merge-commit-sha>) before deleting the branch rather than checking out master. Verify merge and remote-branch state separately.

Move to: