# Resolve Git Merge Conflicts Safely

Merge and rebase conflicts often hide competing design intentions. This skill guides Claude, Codex, and Claude Code through research, resolution, validation, and completion.

## Install

```bash
npx skillstore add mattpocock/resolving-merge-conflicts
```

## Metadata

- Status: approved
- Slug: mattpocock-resolving-merge-conflicts
- Skillstore revision: r2
- Version status: missing
- Tree hash: bfee04f9aa5a08eac96f6e279f483dffa19d7b8ad8fe11ec5ee90e8d25b101e4
- Author: mattpocock
- GitHub username: mattpocock
- License: MIT
- Repository: https://github.com/mattpocock/skills/tree/main/skills/engineering/resolving-merge-conflicts/
- Ref: ebdfe608f5de2b66ff37ab4af12af8ac4f5e8006
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 69
- Public page: https://skillstore.pages.dev/skills/mattpocock-resolving-merge-conflicts
- Manifest: https://skillstore.pages.dev/api/skills/mattpocock-resolving-merge-conflicts/manifest

## Capabilities

- Inspects the active merge or rebase state, Git history, and conflicting files.
- Traces each conflicting change through commits, pull requests, issues, and tickets.
- Resolves conflict hunks while preserving compatible intent and documenting necessary trade-offs.
- Discovers and runs project checks such as type checking, tests, and formatting.
- Stages resolved files, completes the merge commit, or continues the rebase sequence.

## Use Cases

- Complete a Feature Merge: Reconcile a feature branch with recent mainline changes while preserving both documented intentions.
- Recover a Rebase: Resolve conflicts across several rebased commits and verify each continuation against project checks.
- Review an Automated Resolution: Trace conflict decisions to commits and tickets before accepting an agent-generated integration.

## Prompt Templates

### Inspect the Conflict

```
Inspect the active Git merge or rebase. List conflicting files, summarize each side, and identify the next safe action. Do not modify files yet.
```

### Resolve One File

```
Resolve the conflicts in [file]. Use commit history to explain both intentions, preserve compatible behavior, and report every trade-off before staging.
```

### Validate the Integration

```
Review all resolved files, discover project checks, and run relevant type checks, tests, and formatting. Report failures caused by the integration.
```

### Complete a Complex Rebase

```
Resolve the active rebase across remaining commits. Research each conflict, preserve intended behavior, validate each step, and request confirmation before staging or continuing.
```

## Limitations

- Requires repository access and an active merge or rebase conflict.
- Cannot guarantee the intended result when commits and project records lack context.
- Does not provide project-specific commands for checks or conflict resolution.
- Broad staging can include unrelated changes unless the worktree and staged diff are reviewed.

## Best Practices

- Inspect status, history, commits, and project records before editing conflict markers.
- Keep unrelated worktree changes separate from the merge or rebase resolution.
- Review the staged diff and run relevant checks before committing or continuing.

## Anti Patterns

- Resolve conflicts from nearby code alone without checking commit or ticket intent.
- Invent new behavior while combining incompatible changes.
- Stage the entire working tree without reviewing unrelated or sensitive files.

## Security Audit

- Audited at: 2026-07-23T16:40:00.669\+00:00
- Summary: The static alert is a false positive because line 10 uses Markdown backticks around a Git option, not Ruby or shell execution. No prompt injection or data-exfiltration intent was found. However, unconditional instructions to never abort and to stage everything can capture unrelated changes or remove a safe recovery option.

## Stats

- Views: 1
- Downloads: 15
- Favorites: 1
- Popularity score: 0
