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 842 stars
66 forks Updated today MIT
Install
Quality Score: 92/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
- 4 months ago
- Last Updated
- today
- Language
- TypeScript
- License
- MIT
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
Code & Development Listed
resolve-merge-conflicts
Resolve git merge/rebase conflicts safely by preserving both sides' intent and validating the result.
20 Updated today
Pythoughts-labs Code & Development Listed
resolving-merge-conflicts
Use when you need to resolve an in-progress git merge/rebase conflict.
1 Updated yesterday
toverux Code & Development Listed
resolving-merge-conflicts
Use when you need to resolve an in-progress git merge/rebase conflict.
48 Updated today
sliamh11