This is a submission for the GitHub Copilot CLI Challenge
Merge conflicts are one of the most common pain points in software development.
When multiple developers work on the same codebase, resolving conflicts manually can be tedious, error-prone, and time-consuming.
What I Built
Git Merger AI is designed to make conflict resolution:
- π€ AI-Powered: Sends conflicting code blocks to Copilot for smart resolutions.
- πΎ Safe: Automatically backs up files before modifying them.
- π Preview Mode: Lets you see AIβs suggested changes before committing.
- β‘ Cross-Platform: Works on Linux, macOS, and Windows.
- π Conflict Summary: Shows exactly how many blocks were resolved per file.
The goal: let developers focus on building features, not spending hours resolving conflicts.
How It Works
- Detect all conflicted files in the repo using Git commands.
- Parse each file for conflict blocks using a robust regex parser.
- Send each block to GitHub Copilot CLI with a concise prompt.
- Replace the conflict block with the AI-generated solution.
- Stage the file and optionally auto-commit the changes.
- Provide a clean summary of all resolved conflicts.
Demo
Github Repository : https://github.com/roshan-acharya/Merge-Resolver
Screenshot
Merge-Resolver Resolving Merge
Merged File Output
My Experience with GitHub Copilot CLI
Using GitHub Copilot CLI was a game-changer:
It intelligently suggested merged code, combining multiple features automatically.
Allowed me to script the full workflow from detection β resolution β commit.
Helped me iterate faster and reduce manual conflict errors.
Extra effort I put in:
Backup system to prevent accidental loss
Preview mode for safe βdry-runβ testing
Robust regex parser for multi-line and indented conflicts
Cross-platform support
This project demonstrates how AI can make DevTools smarter, reducing developer friction in real workflows.
Installation & Usage
Clone Repository and create CLI tool:
git clone https://github.com/roshan-acharya/Merge-Resolver
pip install -r requirements.txt
cd Merge-Resolver
pip install -e .
Preview Mode
git-merger --p
Run the resolver when conflict occur:
git-merger
Key Takeaways
Merge conflicts donβt have to be painful β AI can handle them.
GitHub Copilot CLI enables automation at the command line, not just IDEs.
Combining regex parsing + AI resolution + Git automation creates a powerful DevTool.



Top comments (0)