fix-merge-conflicts
FeaturedResolve Git merge, rebase, or cherry-pick conflicts by preserving intent from both sides. Use when unmerged paths or conflict markers are present, especially when you must inspect the PR title and description tied to conflicting commits before choosing a resolution.
Code & Development 890 stars
69 forks Updated 3 weeks ago MIT
Install
Quality Score: 91/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
Resolve conflicts by intent, not by line order.
## Workflow
1. Run preflight conflict detection. If no local merge/rebase/cherry-pick conflicts are present, automatically fetch and merge `origin/main`.
2. Identify conflicted files and candidate commits.
3. Map each conflicting commit to its PR.
4. Read PR title and description to extract intent.
5. Detect intent divergence and request user intervention.
6. Resolve conflicts to preserve both intents when compatible.
7. Validate behavior with targeted checks.
8. Summarize decisions and any tradeoffs.
## 0) Preflight: Ensure a Conflict Exists
If there are no active unmerged paths, proactively merge latest `origin/main` to surface conflicts:
```bash
git status --porcelain
git diff --name-only --diff-filter=U
```
Decision rule:
- If `git diff --name-only --diff-filter=U` returns files, skip auto-merge and continue to conflict analysis.
- If it returns nothing, run:
```bash
git fetch origin
git merge origin/main
```
Then re-check:
```bash
git diff --name-only --diff-filter=U
```
- If conflicts now exist, continue with the rest of this workflow.
- If still no conflicts, report that no merge conflicts were detected and stop.
## 1) Identify Conflict Scope
Run:
```bash
git status --porcelain
git diff --name-only --diff-filter=U
git log --left-right --merge --oneline
```
Use `git log --left-right --merge` as the starting set of commits that influenced the conflicted hunks.
## 2) Map Commits to PRs
Prefer GitHub metadata...
Details
- Author
- saffron-health
- Repository
- saffron-health/libretto
- Created
- 6 months ago
- Last Updated
- 3 weeks ago
- Language
- TypeScript
- License
- MIT
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
Code & Development Listed
fix-merge-conflicts
Resolve merge conflicts non-interactively, validate build and tests, and finalize conflict resolution
16 Updated today
ulises-jeremias Code & Development Listed
git-resolve-conflicts
Resolves merge or rebase conflicts by what each side intended, never by picking a hunk, then re-runs the full gates.
2 Updated today
ainova-systems Code & Development Listed
resolve-merge-conflicts
Resolve git merge/rebase conflicts safely by preserving both sides' intent and validating the result.
15 Updated today
Pythoughts-labs