Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

determining which branches in conflict during an octopus merge

We are trying to institute a process using git octopus merges to consolidate many topic branches for regular releases. When there is a conflict, it doesn't seem to output which branches were in conflict. Does anyone know a way to determine what branches the conflicts came from after an octopus merge?

like image 338
Kallin Nagelberg Avatar asked Mar 29 '11 15:03

Kallin Nagelberg


People also ask

How do you identify a merge conflict?

To see the beginning of the merge conflict in your file, search the file for the conflict marker <<<<<<< . When you open the file in your text editor, you'll see the changes from the HEAD or base branch after the line <<<<<<< HEAD .

Does merging affect both branches?

No, merging does only affect one branch.

How many branches required for a merge conflict occur?

A conflict arises when two separate branches have made edits to the same line in a file, or when a file has been deleted in one branch but edited in the other.


1 Answers

The git merge man page mentions:

octopus

This resolves cases with more than two heads, but refuses to do a complex merge that needs manual resolution. It is primarily meant to be used for bundling topic branch heads together. This is the default merge strategy when pulling or merging more than one branch.

And this thread does indeed illustrate that:

The octopus strategy cannot do merges which need manual resolution. Or so the doc says. After trying the merge with 4 2 5, Git tells you:

Trying simple merge with 7ff9b5bd514cb600bac935ebd40eae366bba7d19
Trying simple merge with 6872cd350154743d59cb4d313cbdb122ac43e537
Simple merge did not work, trying automatic merge.
Auto-merging file.txt
ERROR: content conflict in file.txt
fatal: merge program failed
Automated merge did not work.
Should not be doing an Octopus.
Merge with strategy octopus failed.

That is, it aborts the merge completely. If you "resolve" it and commit it's simply a commit that you make.

like image 59
VonC Avatar answered Sep 20 '22 01:09

VonC