Questions tagged [merge-conflict-resolution]

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.

See also

755 questions
8
votes
4 answers

Dealing with conflicts when merging from development to master

I begun a workflow where I aim to do all new features in a development branch and the master branch will only be for production ready code. After doing the following: git checkout master git merge staging I received a bunch of conflicts looking…
Fellow Stranger
  • 32,129
  • 35
  • 168
  • 232
8
votes
1 answer

Can I merge only non-conflicting changes in Git?

How can I simply (e.g. in one command?) merge in Git, keeping the state of conflicting files as in the current branch and without specifying each file individually as in theirs/ours options? git checkout master git merge stable…
Paul
  • 25,812
  • 38
  • 124
  • 247
8
votes
2 answers

How to solve xib file's merge conflict?

Our project use svn to manage source version. We have a problem that when a xib is modified by 2 person, it will almost conflict after merging. I've open the confilct file using vim, the information is not readable and I don't know how to solve the…
tangqiaoboy
  • 1,476
  • 1
  • 15
  • 32
7
votes
4 answers

Split a file with conflict markers

I am looking for a tool that will split a file that has conflict markers into the two separate files. Is there anything out there that does this already?
Quincy Bowers
  • 390
  • 2
  • 15
7
votes
1 answer

How to resolve "file location" conflicts during rebase using the suggested resolution?

CONFLICT (file location): path/to/tests/NS/Domain/Projects/Foo/Bar/stories/workspace-public-channel-SOME_UUID.json added in HEAD inside a directory that was renamed in (Reorganize tests), suggesting it should perhaps be moved to…
Szczepan Hołyszewski
  • 2,707
  • 2
  • 25
  • 39
7
votes
4 answers

Does Git keep a record of past merge conflicts?

I'd like to look at the repository history and see what types of merge conflicts have occurred in the past. I've tried using git log --merges but that just seems to show successful merges.
Stu
  • 324
  • 3
  • 10
7
votes
1 answer

SVN merge conflict editing: What do vertical bars ("|||||||") mean?

When I hand-edit a merge conflict after svn update, I find something like this in the file: <<<<<<< .mine act(); ||||||| .r328 bid(); ======= cue(); >>>>>>> .r329 What do the vertical bars ("|||||||") mean? Before posting this question,…
Alex Quinn
  • 4,033
  • 3
  • 18
  • 18
7
votes
1 answer

How do I get KDiff3 to auto merge with no UI?

How do I get KDiff3 to automatically do a 3-way merge such that it shows no UI? Ideally, if it succeeds, it returns success, and if it can't (it needs manual merging), it returns an error code. Everything I've read seems to imply that the following…
7
votes
1 answer

SourceTree - rebase --interactive - Merge conflict aborts rebase

How can I use SourceTree for doing an interactive rebase on another branch, if the rebase causes merge conflicts? What I observe: I use SourceTree to do an interactive rebase, by right clicking on the branch I want to rebase upon, and selecting…
7
votes
2 answers

How to resolve a git conflict by keeping all additions from both sides?

I keep running into the following problem and I'd like to know whether there is an easy solution to it using existing git commands or whether I'll need to write a custom merge driver. Here's an example to demonstrate my problem: Say the master…
7
votes
1 answer

CoreData merge conflict shows managed object version change not data

I am have an entity in core data and I try to update it from two different context. I am storing managedObjectID of my managed object which I need to update as it is thread safe. Before updating my object I refresh the object to avoid merge…
7
votes
1 answer

If I Resolve a Conflict Does it Change Git Blame?

I'm trying to figure out whether a merge conflict was responsible for a bug, but I'm having difficulty because I'm not clear on how conflict resolution affects git blame. Let's say I have a file in master: a(); b(); c(); I modify it in…
machineghost
  • 33,529
  • 30
  • 159
  • 234
6
votes
4 answers

Who is `them` and `us` in a `git revert`?

I can't make sense of who us and them are in these conflicts during a git revert, so I don't really know what's happening here: git revert some_commit_hash Then git status shows the following conflicts: deleted by them: path/to/file1.h both…
Gabriel Staples
  • 36,492
  • 15
  • 194
  • 265
6
votes
1 answer

Avoid re-resolving conflicts in a git rebase including merge commits

Trying to move history from one repo to another (no common root) by adding the source remote and rebasing to a branch on the local destination repo. Source: A-B-C \ / E Wanted on destination: F-A'-B'-C' \ / E' Documentation for git…
Mart
  • 135
  • 1
  • 10
6
votes
2 answers

How can I get my git merge conflicts into a diff-like format?

I'm merging two git changesets (or perhaps - in the process of git rebase'ing, which merges changesets) involving file foo, and have some merge conflicts. The file looks like so: text appearing in all changesets <<<<<<< HEAD text added on the…
einpoklum
  • 118,144
  • 57
  • 340
  • 684