Conflict-Fix-LLM is a tool that leverages Large Language Models (LLMs) to analyze and resolve merge conflicts in Git repositories automatically. It integrates multiple LLM providers, including Google Gemini, Groq, and Maritaca, to generate optimal resolutions for conflicting code blocks.
- Python 3.8+
- pandas (>=2.0.0) – Data processing and manipulation
- litellm (>=1.63.0) – Unified interface for interacting with multiple LLMs
Ensure you have the following installed on your system: Git, Python 3.8 or later
-
Clone the repository:
git clone https://github.com/crisleymarques/gitmerge-exp.git cd gitmerge-exp -
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
cp .env.example .env
-
Edit the
.envfile with your API keys:GOOGLE_API_KEY=your-google-api-key GROQ_API_KEY=your-groq-api-key MARITACA_API_KEY=your-maritaca-api-key DEFAULT_LLM_PROVIDER=google DEFAULT_LLM_MODEL=gemini-2.0-flash
To run the project with default settings:
python -m src.experiment.mainTo specify a different LLM provider and model:
python -m src.experiment.main --provider groq --model llama3-8b-8192Available options:
--provider: LLM provider (google, groq, maritaca)--model: Specific provider model
Results are saved in the data/output/ directory in JSON format, including:
- Processed conflicts
- LLM-generated resolutions
- Time and performance metrics