Skip to content

chore(docs): worktree --unset-upstream to prevent PR bypass (#1695)#1698

Merged
mrveiss merged 1 commit intoDev_new_guifrom
chore/1695-worktree-tracking-gotcha
Mar 14, 2026
Merged

chore(docs): worktree --unset-upstream to prevent PR bypass (#1695)#1698
mrveiss merged 1 commit intoDev_new_guifrom
chore/1695-worktree-tracking-gotcha

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Mar 14, 2026

Summary

  • Adds git branch --unset-upstream to the worktree creation instructions in CLAUDE.md
  • Prevents worktree branches from tracking origin/Dev_new_gui directly, which can cause commits to land on Dev_new_gui via fast-forward merge without going through a PR

Root cause

When git worktree add -b <branch> origin/Dev_new_gui creates a branch, it automatically sets upstream tracking to origin/Dev_new_gui. If another session rebases or fast-forwards Dev_new_gui past the worktree's commit, the commit bypasses code review.

Retroactive review

Commit e4517859b (the direct push that prompted this issue) was reviewed:

  • 2 files changed: auto-close-issues.yml (text-only, workflow rename + comment-only behavior), CLAUDE.md (ritual text update)
  • No logic bugs, no security issues, no concerns

Closes #1695

Test plan

  • Verify CLAUDE.md worktree section includes --unset-upstream command
  • Verify explanatory text follows the code block

…1695)

Worktree branches created with `origin/Dev_new_gui` as start-point
automatically track upstream. If another session merges work that
fast-forwards past the worktree commit, it lands on Dev_new_gui
without a PR. Adding `git branch --unset-upstream` after worktree
creation prevents this.
@github-actions
Copy link
Copy Markdown

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

@mrveiss mrveiss merged commit 76faa1b into Dev_new_gui Mar 14, 2026
3 checks passed
@mrveiss mrveiss deleted the chore/1695-worktree-tracking-gotcha branch March 14, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant