pr-conflict-from-mid-flight-merges

Diagnose and resolve GitHub PR conflicts caused by sibling PRs landing on main mid-flight.

3|Updated May 8, 2026
One-click install
npx skills add https://github.com/wan-huiyan/agent-traffic-control --skill pr-conflict-from-mid-flight-merges-wan-huiyan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pr-conflict-from-mid-flight-merges
Source: https://github.com/wan-huiyan/agent-traffic-control/tree/main/plugins/agent-traffic-control/skills/pr-conflict-from-mid-flight-merges
Command: npx skills add https://github.com/wan-huiyan/agent-traffic-control --skill pr-conflict-from-mid-flight-merges-wan-huiyan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? A pull request that was clean when opened now shows "This branch has conflicts that must be resolved" because other PRs landed on main while it sat open. A naive rebase replays redundant cherry-picked or squash-merged commits, and reconciling shared values like test counts can silently produce wrong numbers. ## Core Features & Use Cases - Conflict Diagnosis: Confirm mergeable: CONFLICTING / mergeStateStatus: DIRTY via gh pr view, then identify which PRs landed on main since the branch point and which files overlap. - Redundant Commit Detection: Compare local HEAD against the remote branch to find stray cherry-picked or squash-duplicated commits, drop them with git reset --hard origin/<branch>, then rebase and force-push with --force-with-lease. - Count Reconciliation Guard: When both sides of a conflict state a measured count (tests, coverage), resolve to a PENDING-REMEASURE placeholder and measure the merged tree once after the rebase instead of copying either side. - Use Case: Your README-fix PR went DIRTY after a release PR squash-merged onto main; follow the seven-step recipe to drop a stray changelog commit, rebase cleanly, reconcile the version table, and return the PR to CLEAN. ## Quick Start Ask the AI to diagnose why my pull request suddenly shows conflicts on GitHub and walk me through rebasing it onto the current main safely.

Frequently Asked Questions about pr-conflict-from-mid-flight-merges

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a GitHub PR that suddenly shows merge conflicts?▼

Fetch origin/main, find what landed since your branch point with git merge-base and git log, then rebase your branch onto origin/main and force-push with --force-with-lease. Verify with gh pr view that mergeable returns to MERGEABLE and mergeStateStatus to CLEAN.

Why does my PR say "This branch has conflicts that must be resolved" when it was clean before?▼

Other PRs landed on main while yours sat open, touching the same files. GitHub then reports mergeable CONFLICTING and mergeStateStatus DIRTY. Check which commits landed with git log $(git merge-base HEAD origin/main)..origin/main to identify the conflicting PRs.

Why does git rebase try to replay commits I never made?▼

Your local branch likely accumulated stray cherry-picked commits or commits already squash-merged onto main under different SHAs. Compare local HEAD against origin/<branch>, drop redundant commits with git reset --hard origin/<branch>, then rebase.

Should I use git push --force or --force-with-lease after rebasing a PR branch?▼

Use --force-with-lease. It refuses to push if origin moved since your last fetch, preventing you from clobbering someone else's force-push, while plain --force overwrites the remote unconditionally.

What does "skipped previously applied commit" mean during git rebase?▼

Git recognized via patch-id that one of your branch's commits is the same logical change as a squash-merged commit already on main, and skipped it. This warning is expected and correct; do not use --reapply-cherry-picks unless you genuinely want a duplicate.

How do I resolve a conflict where both sides changed a test count or coverage number?▼

Do not copy either side's number, since the merged tree's true count is a third value nobody measured. Resolve to a placeholder like PENDING-REMEASURE, finish the rebase, measure the final tree once, and replace the placeholder before pushing.