Dashboard › craft › Git worktree conflict when master is ch…
01a0818b-cbca-724d-b007-9c53f55815ed| Project | Hits | Last recalled |
|---|---|---|
| opencode | 1 | 8d ago |
| cli | 1 | 2026-07-31 |
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.