---
title: "How do I resolve a merge conflict in Git?"  
description: "How do I resolve a merge conflict in Git?"  
author: "Davide Romano"  
published: 2026-11-16  
updated: 2026-11-16  
canonical: https://www.mindstick.com/forum/163045/how-do-i-resolve-a-merge-conflict-in-git  
category: "Git and DevOps"  
tags: ["git", "merge conflict", "Version Control", "Collaboration", "troubleshooting"]  
reading_time: 1 minute  

---

# How do I resolve a merge conflict in Git?

I ran git pull and now there are weird <<<<<<< symbols in my files. What do I do?

## Replies

### Reply by Priyanka Mandal

A merge conflict means Git could not decide automatically, because both branches changed the same lines. Git marks the problem area in the file:

```
<<<<<<< HEAD
your version
=======
their version
>>>>>>> feature-branch
```

Steps:

1. Run `git status` to see the files marked "both modified".
2. Open each file and decide: keep yours, keep theirs, or combine both. Delete the three marker lines.
3. Build and test, to be sure the result works.
4. `git add <file>` for each fixed file.
5. Finish with `git commit` (for a merge) or `git rebase --continue` (for a rebase).

If you get lost, `git merge --abort` (or `git rebase --abort`) takes you back to before it started.

Visual Studio, VS Code and tools like the three-way merge editor make this easier. To have fewer conflicts, pull often and keep branches short-lived.


---

Original Source: https://www.mindstick.com/forum/163045/how-do-i-resolve-a-merge-conflict-in-git

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
