MERGE CONFLICT RESOLUTION
Identify, analyze, and resolve code conflicts before merging.
GitRabbit assists you in resolving complex branch merges. The agent parses standard conflict markers (<<<<<<<, =======, >>>>>>>), evaluates parent history from both base and head branches, and generates a resolved file version that preserves both feature implementations without losing code changes.
Key_Capabilities
Dual-Branch Evaluation
Traces logic changes on both branches to understand original intent.
AST-Level Verification
Ensures the generated resolution is syntax-compliant and won't crash when executed.
Resolve Suggestions
Receive the resolved code via the GitRabbit interface to write or commit changes easily.
Setup_Sequence
Conflict Detection
GitRabbit detects when a pull request cannot be merged due to conflict markers.
Synthesize Resolution
The agent reviews conflict sections and evaluates surrounding imports to write a resolved file state.
Commit Resolution
Accept the resolution to automatically push a clean merge commit.
Code_Example
<<<<<<< HEAD const apiUrl = "https://api.production.acme.com"; ======= const apiUrl = process.env.NEXT_PUBLIC_API_URL || "https://api.staging.acme.com"; >>>>>>> feature-branch // GitRabbit Proposed Resolution: const apiUrl = process.env.NEXT_PUBLIC_API_URL || "https://api.production.acme.com";
Pro_Tips
- ✦Use local CLI reviews ('gitrabbit review --staged') to identify and resolve conflicts prior to pushing your work.
- ✦Always review the resolved code outputs if they contain database structure updates.