A three-way merge is where an original file (ancestor or base) is merged with two other versions of the same file (children). The goal is to create a new file that is derived from the ancestor and contains modifications between ancestor and child 1, and modifications between ancestor and child 2 as well.
Questions tagged [3-way-merge]
24 questions
32
votes
2 answers
How does the 3 way merge in Mercurial/Meld work?
I'm working on a project where I have a commit that introduced a feature with major problems that weren't discovered immediately. Now I want to completely remove that revision while keeping the work following it but i'm having a hard time wrapping…

Asa Ayers
- 4,854
- 6
- 40
- 57
19
votes
2 answers
Skip undo step in Vim
Let's say I'm at state A in my document. I then make changes B, C, and D (in order).
Is there a way I can keep changes B and D, but skip C?
Or, let's say I'm at state A in my document. I make change B, undo it, and then make changes C and D (so Vim…

Kevin Burke
- 61,194
- 76
- 188
- 305
16
votes
1 answer
Understanding Meld 3 way merge with Git
My boss set up our new Git repository, one on our Windows server and one on our Linux Server.
I was asked to resolve our conflicts so I chose to use Meld.
When I run the first file it opens 3…

Naterade
- 2,635
- 8
- 34
- 54
13
votes
5 answers
Mercurial Workflow for small team
I'm working in a team of 3 developers and we have recently switched from CVS to Mercurial. We are using Mercurial by having local repositories on each of our workstations and pulling/pushing to a development server. I'm not sure this is the best…

Tarski
- 5,360
- 4
- 38
- 47
12
votes
1 answer
Why does 'git mergetool' (meld) show conflict markers?
Why does 'git mergetool' (meld) show me the ancestor view WITH conclict markers? This is totally wrong and I've never understood why it does this. How can I fix it?
A 3 way merge should show
[ Your Changes ] [ Common Base ] […

Mark Renouf
- 30,697
- 19
- 94
- 123
11
votes
2 answers
What are the proper use cases of "git merge --squash"?
Some people like git merge --squash due to the reason as follows:
Squashing to a single commit gives you an opportunity to clean up messy WIP commits and provide a good rationale for the changes your are…

Tomoyuki Aota
- 867
- 9
- 18
8
votes
2 answers
Is git's merge conflict resolution more efficient than other SCMs and merge tools?
Is git's merge conflict resolution inherently more efficient than other SCMs (CVS,Subversion,etc.), and also standalone merge tools? If so, why?
Clarification: here I'm more interested in the algorithm itself - is it any different from a plain diff3…

inger
- 19,574
- 9
- 49
- 54
4
votes
2 answers
Is there a sensible way to merge Visual Studio project files (.csproj) between branches?
Once again I having to merge code between branches and the textual merge tool is finding a lot of conflict in the project files.
I expect that a tool that understood a project file (files add/removed and compile options changed) could do the 3 way…

Ian Ringrose
- 51,220
- 55
- 213
- 317
4
votes
2 answers
Can I diff more than one file at a time using subversion and Beyond Compare?
So, I've successfully figured out how to do a simple diff and a 3 way merge with command-line subversion and Beyond Compare 3 using Windows 7. Thank you, stackoverflow.
However, I frequently have lots of files that I change in between commits, i.e.…

gailbear
- 519
- 3
- 13
4
votes
1 answer
Main differences between P4Merge and DiffMerge
My team is looking for a powerful 3-way merge tool to add to our toolbox. I identified P4Merge and DiffMerge as top candidates for us because they are considered the best here on SO (thank you SO community) and they meet corporate licensing…

Peter Kofler
- 9,252
- 8
- 51
- 79
3
votes
1 answer
Pull Request merged and reverted in feature-branch prevents from re-merging it
I have the following situation in git:
2 feature branches: feature-01 and feature-02
1 sub-feature branch: sub-feature-01
I merged sub-feature-01 to feature-01 but then decided to revert it. Then merged feature-01 to master.
I then merge…

mzakrze
- 53
- 3
3
votes
3 answers
2 or 3-way merge of word or pdf files
So I am not sure if this exists, so I am asking the wise folks for StackOverflow for some help.
I am looking for a 2 or 3-way (preferably) document merging tool that works great with either MS Word documents or PDFs. What I have are multiple…

JustAnotherDev
- 295
- 3
- 13
2
votes
1 answer
How do I 3-way merge using TortoiseHg 2.0.3 and Beyond Compare 3.2.4
I can configure TortoiseHg to launch Beyond Compare 3 when a 3-way merge is needed, but I haven't been able to get it to show the names and versions of the files being compared. It displays the names and versions of files when doing a 2-way file…

David Ei
- 191
- 1
- 5
2
votes
2 answers
How to automatically put a file as resolved after merge
I started using TortoiseGit for Windows but I found some things annoying. For example when I have a conflict during a merge I need to do the following:
do the 3 way merge (of course... there is no other choice)
mark the file as resolved
Is there…

INS
- 10,594
- 7
- 58
- 89
2
votes
2 answers
Conceptually how is `git revert` related to three way merge?
I am trying to understand how git revert uses three way merge from
https://stackoverflow.com/a/37151159
Suppose the current branch is B, does command git revert C create a commit D, so that B is the result of three-way merge of C and D with…

Tim
- 1
- 141
- 372
- 590