When merging branches in a version control system, a merge conflict might arise. This tag is for questions about how such conflicts can be resolved.
Questions tagged [merge-conflict-resolution]
755 questions
17
votes
3 answers
How to use XCode's mergetool to resolve conflicts?
I'm in the middle of a rebase and I need to fix some merge conflicts. When I open the file in XCode, I see the source control conflict markers (<<<<<<<, etc) in the file.
How can I use XCode's mergetool to resolve these conflicts in a graphical…

Mike Miller
- 3,368
- 5
- 36
- 49
16
votes
2 answers
How to change the conflict resolution interface in vscode?
Some days ago vscode started showing the following interface any time I had a git conflict:
But I don't like it and want the regular one, the one that looks like this:
How can I modify the configurations to change this interface, I've explored…

Cristian Diaz
- 315
- 1
- 3
- 11
16
votes
1 answer
VimDiff E93: More than one match for RE
So I am new to using vimdiff, however I feel like there is some error. Whenever I try to choose the changes from the remote repository with the command:
:diffg RE
I get the error:
E93: More than one match for RE
Not sure where this is coming from…

Joshua Vandenbor
- 509
- 3
- 6
- 19
16
votes
2 answers
Telling git to follow moved content (not simply moved files)
While refactoring source code, sometimes you need to move big blocks of text inside a file, or even to a new file. You create a branch refactored and commit away:
$git checkout master
$git branch refactored
$git checkout refactored

loopbackbee
- 21,962
- 10
- 62
- 97
16
votes
3 answers
Show conflict diff part of a merge
I need to present to the team what changes I've made during conflict resolution of a merge.
I know this is kind of hard, but I certainly believe it is possible somehow. I've tried already git show -m and git show -c.

brauliobo
- 5,843
- 4
- 29
- 34
15
votes
4 answers
Why does git show a conflict between two apparently identical added files?
I have a project that was started in TFS, then moved to Git. Unfortunately, the guy who moved it to Git just checked in the current files instead of using git-tfs. I'm trying to rebase his new commits in Git on top of the commits I pulled from TFS…

Ryan Lundy
- 204,559
- 37
- 180
- 211
15
votes
1 answer
Git conflicts in pull requests
I have 2 branches - master and develop
I have been doing some pull requests in my develop branch where it contains 5 items, in which it is the same as the number of items in master.
However, someone did some commits and pushed in a few more items…

dissidia
- 1,531
- 3
- 23
- 53
15
votes
2 answers
Send merge conflicts to collaborators to resolve in Git
While resolving merge conflicts, if I don't know which one to pick (because I'm not aware of any of the two changes), I would like to
create a patch, or
create separate branch (kind of), or
anything else which can be done,
so that I can send the…

IsmailS
- 10,797
- 21
- 82
- 134
15
votes
4 answers
Cannot Merge due to conflict with UserInterfaceState.xcuserstate
I created a branch and made a bunch of changes. I committed the changes and then archived the changes. Then I switched to the master branch and tried to do a merge. It said I had uncommitted changes. So I did a commit on the master branch to see…

JeffB6688
- 3,782
- 5
- 38
- 58
14
votes
2 answers
Resolve merge conflict only for some files and commit to branch for other teams to resolve theirs
In short, we have one repo which hosts code for different functional teams, i.e. server-side, mobile, ci, automation qa etc.
Now when we are trying to pull down from support-branch bug fixes into dev-release-branch a lot of conflicts appear related…

monitor
- 251
- 2
- 9
14
votes
3 answers
How do I resolve conflicts with Git?
I have a pull request for which GitHub tells me "This branch has conflicts that must be resolved." I tried:
~/src/networkx: git rebase origin/master
Current branch topo is up to date.
~/src/networkx: git merge origin/master
Already up-to-date.

Neil G
- 32,138
- 39
- 156
- 257
14
votes
1 answer
Git rebase fails with conflicts, but there are no conflicts
I tried to do a rebase on code that I had committed but not pushed, because I had heard that there were some changes in the origin that might affect what I was working on. Here's what I get:
$ git rebase origin/thor-develop
First, rewinding head to…

EmmyS
- 11,892
- 48
- 101
- 156
14
votes
2 answers
Git pull aborts itself, local file changes will be overwritten by merge
I have changed a file that my friend is working at the same time. I did some changes and now I want to push it but it says I should pull first. When I git pull, it says:
error: Your local changes to the following files would be overwritten by…

Sasha_8
- 143
- 1
- 1
- 8
13
votes
2 answers
git merge conflict due to renaming in two branches - how to fix & avoid in future?
I have two local branches master and dev. Both branches contained three folders:
projectBeta
project
project_v1
I wanted to just keep projectBeta and remove project and project_v1 and then rename projectBeta as project. So that's what I did…

SubG
- 740
- 1
- 7
- 14
13
votes
2 answers
How to solve merge conflict in a approved review in gerrit?
I made a change in gerrit which was code reviewed and after 7 revisions approved. But, now it cannot be merged and trying to rebase in gerrit website is not working due to merge conflict. How can I resolve this merge conflict and merge the same…

Arshak Anj
- 149
- 1
- 2
- 8