fix-merge-conflicts

Fetch origin/main, merge into the current branch, resolve conflicts, and push.

12|5|Updated Jan 14, 2025
One-click install
npx skills add https://github.com/MoonLadderStudios/MoonMind --skill fix-merge-conflicts-moonladderstudios
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fix-merge-conflicts
Source: https://github.com/MoonLadderStudios/MoonMind/tree/main/.agents/skills/fix-merge-conflicts
Command: npx skills add https://github.com/MoonLadderStudios/MoonMind --skill fix-merge-conflicts-moonladderstudios

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps a feature or topic branch synchronized with the latest origin/main and removes the manual friction of resolving merge conflicts, ensuring a clean commit history and push-ready branch.

Core Features & Use Cases

  • Automated sync and merge: Fetches origin/main, merges it into the current branch, and handles fast-forward or merge commit flows.
  • Conflict resolution guidance and validation: Identifies conflicted files, enforces removal of conflict markers, stages resolved files, and completes the merge commit.
  • Verification and safe push: Runs quick verification checks where appropriate, ensures git user identity is set, and pushes the updated branch.
  • Use Case: Keep a long-lived feature branch up to date before opening or updating a pull request, resolving integration conflicts reliably.

Quick Start

Fetch the latest origin/main, merge it into the current branch, resolve any conflicts, verify no conflict markers remain, and push the branch.

Frequently Asked Questions about fix-merge-conflicts

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

FAQPage Schema
How do I resolve git merge conflicts and push my feature branch?

To resolve git merge conflicts, fetch origin/main, merge it into your current branch, identify conflicted files, remove conflict markers, stage resolved files, and push. This ensures a clean commit history.

What is the best way to sync a local git branch with origin/main before a pull request?

The best way to sync a local git branch with origin/main is to fetch the latest changes, perform a merge, and resolve any integration conflicts. This keeps your feature branch up to date and push-ready before opening a pull request.

How does conflict marker validation work during a git branch merge?

Conflict marker validation works by scanning merged project files for unresolved git markers. It enforces the removal of these markers, stages the successfully resolved files, and completes the merge commit to ensure a clean repository state.

Do I need to configure my git identity to push a merged branch to origin?

Yes, you need to configure your git identity to push a merged branch to origin. The workflow ensures your git user identity is set before pushing the synchronized branch, allowing valid merge commits to be attributed correctly.

Can I run verification tests after resolving version control conflicts?

Yes, you can run verification tests after resolving version control conflicts. The workflow performs optional quick verification checks on the merged code to ensure stability before completing the commit and pushing the branch to origin.