Skip to content

docs: clarify "shared branch" definition in git operations policy - #2306

Open
Michael Flanakin (flanakin) wants to merge 1 commit into
devfrom
flanakin/clarify-shared-branch-policy
Open

docs: clarify "shared branch" definition in git operations policy#2306
Michael Flanakin (flanakin) wants to merge 1 commit into
devfrom
flanakin/clarify-shared-branch-policy

Conversation

@flanakin

Copy link
Copy Markdown
Collaborator

🛠️ Description

Clarifies what counts as a "shared" branch in the repo's Git Operations Policy. Previously "shared branches" was undefined, which came up in PR #2285 when deciding whether rebase/force-push were permitted on a personal flanakin/* branch that already had review activity.

This PR defines shared branches explicitly as main, dev, and features/*, and clarifies that a personal {username}/{branch} branch is not shared regardless of review or comment activity on it. It also updates the rebase, force-push, and history-rewrite prohibitions and the conflict-resolution guidance to carve out personal branches accordingly — a personal branch can now be rebased onto dev (and force-pushed after) to resolve conflicts, in addition to the existing merge option.

📋 Checklist

🔬 How did you test this change?

  • 🤏 Lint tests

Docs-only change to AGENTS.md — no build or deploy impact.

📦 Deploy to test?

Not applicable.

🙋‍♀️ Do any of the following that apply?

  • 🚨 This is a breaking change.
  • 🤏 The change is less than 20 lines of code.

📑 Did you update docs/changelog.md?

  • ❎ Log not needed (small/internal change)

📖 Did you update documentation?

  • ✅ Internal dev docs in src (required for dev)

🤖 Generated with Claude Code

Defines shared branches explicitly as main, dev, and features/*, and
carves out personal {username}/{branch} branches from the rebase,
force-push, and history-rewrite prohibitions. A personal branch stays
non-shared regardless of review or comment activity on it, so it can be
synced with dev via rebase instead of only merge.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 8, 2026 02:10
@flanakin Michael Flanakin (flanakin) added this to the v15 milestone Sep 8, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Micro PR 🔬 Very small PR that should be especially easy for newcomers label Sep 8, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs: Review 👀 PR that is ready to be reviewed label Sep 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The updated policy introduces an internal wording contradiction (“all git operations” being non-destructive) that should be qualified to align with the newly permitted history-rewrite actions on personal branches.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Clarifies the repository’s Git Operations Policy by explicitly defining which branches are considered “shared” and documenting when history-rewrite operations are allowed, helping reviewers and contributors apply consistent rules during conflict resolution and branch maintenance.

Changes:

  • Defines “shared branches” as main, dev, and features/*, and clarifies that {username}/{branch} is personal even with review activity.
  • Updates rebase/force-push guidance to prohibit these on shared branches while permitting them on personal branches.
  • Updates conflict-resolution guidance to allow either merge or rebase on personal branches, but only merge on shared branches.
File summaries
File Description
AGENTS.md Documents an explicit shared-branch definition and refines rebase/force-push/conflict-resolution rules to distinguish shared vs. personal branches.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread AGENTS.md
Comment on lines 171 to +173
This repository supports production infrastructure managing significant revenue. All git operations must be non-destructive and preserve full commit history.

**What counts as "shared":** `main`, `dev`, and `features/*` branches. A personal `{username}/{branch}` branch is not shared, regardless of review or comment activity on it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Micro PR 🔬 Very small PR that should be especially easy for newcomers Needs: Review 👀 PR that is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants