[Question]
  [
When using a tool such as git to merge two files, a conflict could be detected and added to the result of the merge.
A merge of these two files:
my file:
```
Common line of code 1
Common line of code 2
my lines
Common line of code 3
Common line of code 4
```
their file:
```
Common line of code 1
Common line of code 2
their lines
Common line of code 3
Common line of code 4
```
would result in:
```
Common line of code 1
Common line of code 2
<<<<<<< Mine
my lines
=======
their lines
>>>>>>> Theirs
Common line of code 3
Common line of code 4
```
See [Conflict Marker Lines](https://www.gnu.org/software/diffutils/manual/html_mono/diff.html#Marking%20Conflicts) 
Resolving this conflict with *Mine* would create this file:
```
Common line of code 1
Common line of code 2
my lines
Common line of code 3
Common line of code 4
```
Resolving this conflict with *Theirs* would create this file:
```
Common line of code 1
Common line of code 2
their lines
Common line of code 3
Common line of code 4
```
The objective of this challenge is to write a source file that contains a conflict and still compiles/executes.
Write a source file which:
1. contains one valid, two-way, conflict marked by the proper patch conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`) Mine and Theirs file descriptors after the markers are optional.
2. compiles/executes without errors/warnings if the markers remain a part of the source
3. compiles/executes without errors/warnings if the conflict is resolved by using *mine*
4. compiles/executes without errors/warnings if the conflict is resolved by using *theirs*
5. outputs "Hello Conflict" when compiling/executing the conflicted file
6. outputs "Hello Mine" when compiling/executing the mine version
7. outputs "Hello Theirs" when compiling/executing the theirs version
The markers should be located in the source file in such a way that kdiff3 recognizes the conflict.
[Standard loopholes](http://meta.codegolf.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default?answertab=votes#tab-top) are forbidden.
The shortest code wins.
Score is the length of the conflicted source
  
[Answer]
## JavaScript (ES6), ~~102~~ ~~94~~ ~~93~~ 90 bytes
```
console.log('Hello',(a=`
<<<<<<<
Mine
=======
Theirs
>>>>>>>
Conflict`.split`
`)[6]||a[1])
```
If the conflict has been resolved, then there is no sixth line, so it prints the now first line instead. Edit: Saved 3 bytes thanks to @nderscore.
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), ~~68~~ ~~67~~ 66 bytes
```
"Hello "wċ₂↰₁w∨"Conflict"w
<<<<<<<
"Mine"
=======
"Theirs"
>>>>>>>
```
[Try it online!](https://tio.run/nexus/brachylog2#@6/kkZqTk6@gVH6k@1FT06O2DY@aGssfdaxQcs7PS8vJTC5RKueygQAuJd/MvFQlLlsI4FIKyUjNLCpW4rKDgP//AQ "Brachylog – TIO Nexus")
[Try the `"Hello Mine"` version here](https://tio.run/nexus/brachylog2#@6/kkZqTk6@gVH6k@1FT06O2DY@aGssfdaxQcs7PS8vJTC5RKudS8s3MS1X6/x8A)
[Try the `"Hello Theirs"` version here](https://tio.run/nexus/brachylog2#@6/kkZqTk6@gVH6k@1FT06O2DY@aGssfdaxQcs7PS8vJTC5RKudSCslIzSwqVvr/HwA)
### Explanation
Thankfully, `<<<<<<<`, `=======` and `>>>>>>>` are all valid rule definitions in Brachylog. They respectively mean:
* Input is less than an implicit varible, itself less than..., etc., itself less than the output.
* All elements of the input are equal, and all elements of the input are equal, and..., and Input = Output
* Same as the first but greater than instead.
If we remove conflicts, we end up with `"Mine"` or `"Theirs"` on the second line, which means they become predicate number 1. Calling that predicate with `↰₁` on the first line will unify its input and output with `Mine` / `Theirs`, which we then print with `w`.
If we call `↰₁` on the conflicted file, we end up calling `<<<<<<<`. We therefore call that predicate with a string as input (using `ċ₂` - coerce to string). `<` will fail with a string as input. We then put a disjunction `∨"Conflict"w` in the main predicate which states that if predicate 1 fails, then we print `Conflict` instead. `↰₁` with a string as input won't fail for the `"Mine"` or `"Theirs"` lines because they are strings.
[Answer]
# PHP, ~~74~~ 65 bytes
Note: uses IBM-850 encoding
```
Hello<?='
<<<<<<<
2:<?PU_~
=======
+;73"&_~
>>>>>>>
'^~ıÇ¼¡Ñ»¬áü;
```
Store to a file and run like this:
```
php -nf conflict.php
```
# Explanation
```
Hello       # Print "Hello"
<?='        # Print result of expression
<<<<<<<     # String with merge conflict
2:<?PU_~
=======
+;73"&_~
>>>>>>>
'
^           # XOR that string with...
~ıÇ¼¡Ñ»¬áü; # ... this string, negated.
```
The binary XOR results in either of the following 3:
```
'
<<<<<<<
' ^ ~'ıÇ¼¡Ñ»¬áü'
==> ' Conflict' 
--------------------------------------------------------------------------
'
2:<?PU_~' ^ ~'ıÇ¼¡Ñ»¬áü'
==> ' Mine' (right padded with nul bytes)
--------------------------------------------------------------------------
'
+;73"&_~' ^ ~'ıÇ¼¡Ñ»¬áü'
==> ' Theirs' (right padded with nul bytes)
```
# Tweaks
* Saved 9 bytes by using binary logic on strings
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 61 bytes
```
"Hello ".("Conflict
<<<<<<<
Mine
=======
Theirs
>>>>>>>
"^n7)
```
[Try it online!](https://tio.run/nexus/pip#@6/kkZqTk6@gpKeh5Jyfl5aTmVzCZQMBXL6ZealcthDAFZKRmllUzGUHAVxKcXnmmv//AwA "Pip – TIO Nexus")
Everything between `""` is a string. We split the large string on newlines (`"..."^n`) and take the 7th element with cyclical indexing (`(___7)`). For the conflicted version, there are seven lines, so index 7 is equivalent to index 0 and we get `Conflict`. For the resolved versions, there are three lines, so index 7 is equivalent to index 1 and we get `Mine`/`Theirs`. Then concatenate `"Hello "` to the front and autoprint.
[Answer]
## Batch, ~~133~~ 129 bytes
```
@set s=Theirs
@goto t
<<<<<<<
:t
@set s=Mine
@goto m
=======
:m
@set s=Conflict
@goto t
>>>>>>>
:t
:m
echo Hello %s%
```
Explanation: The `goto` statement goes to the next label it can find. In the case of the conflict, this just ends up skipping the conflict markers, and `s` gets its final value. In the case of resolving with Mine, the gotos have no effect, but the last `set` no longer exists, so the result is Mine. In the case of resolving with Theirs the inital `goto` bypasses the remaining `set` so the result is its initial value. Edit: Saved 4 bytes thanks to @DLosc.
[Answer]
## Python 2, ~~88~~ 87 bytes
```
print 'Hello','''
<<<<<<<
Mine
=======
Theirs
>>>>>>>
Conflict'''.split('\n')[1::5][-1]
```
Prints the sixth or (now) first line as appropriate.
[Answer]
# .COM opcode, 77 bytes
```
0000h: B4 09 BA 17 01 CD 21 BA 1F 01 80 3E 1F 01 3C 75 ; ......!....>..<u
0010h: 03 BA 44 01 CD 21 C3 48 65 6C 6C 6F 20 24 0A 3C ; ..D..!.Hello $.<
0020h: 3C 3C 3C 3C 3C 3C 0A 4D 69 6E 65 24 0A 3D 3D 3D ; <<<<<<.Mine$.===
0030h: 3D 3D 3D 3D 0A 54 68 65 69 72 24 0A 3E 3E 3E 3E ; ====.Their$.>>>>
0040h: 3E 3E 3E 0A 43 6F 6E 66 6C 69 63 74 24          ; >>>.Conflict$
        org 100h
        mov ah, 9
        mov dx, str1
        int 21H
        mov dx, str2
        cmp [str2], byte '<'
        jne $+5
        mov dx, str3
        int 21H
        ret
str1    db 'Hello $', 10
str2    db '<<<<<<<', 10
        db 'Mine$', 10
        db '=======', 10
        db 'Their$', 10
        db '>>>>>>>', 10
str3    db 'Conflict$'
```
If a space after `<<<<<<<` allowed, 75 bytes
```
0000h: B4 09 BA 0D 01 CD 21 BA 1E 01 CD 21 C3 48 65 6C ; ......!....!.Hel
0010h: 6C 6F 20 24 0A 3C 3C 3C 3C 3C 3C 3C 20 0A 43 6F ; lo $.<<<<<<< .Co
0020h: 6E 66 6C 69 63 74 24 4D 69 6E 65 24 0A 3D 3D 3D ; nflict$Mine$.===
0030h: 3D 3D 3D 3D 0A 2A 2A 2A 2A 2A 2A 2A 2A 54 68 65 ; ====.********The
0040h: 69 72 24 0A 3E 3E 3E 3E 3E 3E 3E                ; ir$.>>>>>>>
        org 100h
        mov ah, 9
        mov dx, str1
        int 21H
        mov dx, str2
        int 21H
        ret
str1    db 'Hello $', 10
        db '<<<<<<< ', 10
str2    db 'Conflict$'
        db 'Mine$', 10
        db '=======', 10
        db '********Their$', 10
        db '>>>>>>>'     
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 51 bytes
```
<<<<<<<
“½&;»
“£<Ø»
=======
“8ẉI»
>>>>>>>
“¢5Ṛ»;2£
```
[Try it online!](https://tio.run/nexus/jelly#@28DAVyPGuYc2qtmfWg3mLXY5vAMINMWArhAYhYPd3V6AsXsIACsbJHpw52zDu22Njq0@P9/AA "Jelly – TIO Nexus")
## Explanation
The conflict markers here are positioned so that one of three lines becomes the second line of the program after the conflict is resolved; this will be a constant, named `2£`. The second line of the original program encodes the string `" Conflict"` (in Jelly's compressed notation); the third line encodes the string `" Mine"` (this will become the second line if the conflict is resolved as mine); the sixth line encodes the string `" Theirs"` (and will become the second line if the conflict is resolved as theirs).
The main program is always the last line, no matter how many lines before it are deleted. It takes the compressed encoding of `"Hello"`, and appends (`;`) the value of `2£` to it, thus producing the desired output.
[Answer]
# [Retina](https://github.com/m-ender/retina), 57 bytes
```
Hello 
$
<<<<<<<
Mine
=======
Theirs
>>>>>>>
<+
Conflict
```
[Try it online!](https://tio.run/nexus/retina#@8/lkZqTk6/ApcJlAwFcvpl5qVy2EMAVkpGaWVTMZQcBXDbaXM75eWk5mckl//8DAA "Retina – TIO Nexus")
[Try the "Mine" version](https://tio.run/nexus/retina#@8/lkZqTk6/ApcLlm5mXymWjzeWcn5eWk5lc8v8/AA)
[Try the "Theirs" version](https://tio.run/nexus/retina#@8/lkZqTk6/ApcIVkpGaWVTMZaPN5Zyfl5aTmVzy/z8A)
**Explanation of Conflict program**
As is often the case with Retina, this program contains many replace stages.
```
Hello 
```
Replace the empty/non-existent input with `Hello`.
```
$
<<<<<<<
```
Replace the end of the working string with `<<<<<<<`
```
Mine
=======
```
Replace `Mine` with `=======`. Since `Mine` doesn't appear anywhere in the working string, this does nothing.
```
Theirs
>>>>>>>
```
Replace `Theirs` with `>>>>>>>`. Same deal as with `Mine`; `Theirs` doesn't appear, so the replacement does nothing.
```
<+
Conflict
```
Replace a sequence of `<` with `Conflict`. We added `<<<<<<<` to the end of the string on the first replacement, so the working string becomes `Hello Conflict`, which is implicitly output at the end of the program.
**Explanation of Mine/Theirs programs**
When the conflict is resolved, the code will look like this:
```
Hello 
$
Mine
<+
Conflict
```
```
Hello 
```
Same as before, starting with the string `Hello`.
```
$
Mine
```
Now instead of appending `<<<<<<<` to `Hello`, we append `Mine`.
```
<+
Conflict
```
Next, we replace a sequence of `<` with `Conflict`. But there are no `<`s in the string, so nothing happens.
The working string, `Hello Mine`, is implicitly output. The "Theirs" program works the same way.
[Answer]
# [OIL](https://github.com/L3viathan/OIL), ~~88~~ ~~80~~ 77 bytes
```
4
2
Hello 
10
Conflict
16
16
8
4
11
3
<<<<<<<
Mine
=======
Theirs
>>>>>>>
4
4
```
`4` `2` is printing line 2 (`Hello`), `10` tests whether line 0 (`4`) is identical with line 16 (the one that contains a `4` when the conflict exists) and jumps to either line 16 or line 8 depending on the result. If it existed, `4` `4` prints line 4 (`Conflict`). If it didn't, `4` `11` prints either `Mine` or `Theirs`, depending on what was merged, and `3` exits.
[Answer]
# Java 145 Bytes
```
()->{String s = "Hello ";/*
<<<<<<<
*/s+="Mine";/*
=======
*/s+="Theirs";/*
>>>>>>>
*/if(s.length()>15)s="Hello Conflict";System.out.println(s);}
```
Java has no multiline strings so some Comment trickery was needed
[Answer]
# Bash, 76 bytes
**Golfed**
```
sed 's/^/Hello /;s/<\+/Conflict/;q'<<E
<<<<<<<
Mine
=======
Theirs
>>>>>>>
E
```
**How it works**
Uses [here doc](https://en.wikipedia.org/wiki/Here_document), to feed the source text to *sed*.
*Sed* will prepend the first line it read with "Hello ", replace the `<<<<<<<` string by "Conflict" and then quit (`q`).
[Try It Online !](https://tio.run/nexus/bash#@1@cmqKgXqwfp@@RmpOTr6BvXaxvE6Ot75yfl5aTmVyib12obmPjymUDAVy@mXmpXLYQwBWSkZpZVMxlBwFcrv//AwA)
[Answer]
# ES6 (Javascript), ~~83~~, 82 bytes
**Golfed**
```
alert("Hello "+((T=`\
<<<<<<<
Mine
=======
Theirs
>>>>>>>
`)[1]>"<"?T:"Conflict"))
```
**Try It**
```
alert("Hello "+((T=`\
<<<<<<<
Mine
=======
Theirs
>>>>>>>
`)[1]>"<"?T:"Conflict"))
alert("Hello "+((T=`\
Mine
`)[1]>"<"?T:"Conflict"))
alert("Hello "+((T=`\
Theirs
`)[1]>"<"?T:"Conflict"))
```
[Answer]
# Java 8, 108 bytes
This is a lambda accepting [empty input](https://codegolf.meta.stackexchange.com/a/12696) and returning nothing.
```
n->System.out.print("Hello "+",Mine,Theirs,Conflict".split(",")[/*
<<<<<<<
*/1/*
=======
*/+2/*
>>>>>>>
*/])
```
[Try It Online](https://tio.run/##rVGxbsIwFJzjr7AyJWCM2hXI0qULE1UXxOAahzp1nq34Gamq@Pb0NQlSxcTADbZ0undn32vUWS18MNAcv/o@pA9nNddOxci3ygL/YdlERlRIV21BOd7QmExonawTaLQe5IuHmFrTrd@9PVYsy1oLhm8YLKrdd0TTSp9Qhs4CFvmrcc7zfJ6LLanE26exXRRkUVMU5jIGZ0km8nK/nLHZ8mk4DyXZCo6D@lHW8@f/3nrSPcZ9PWL6wGbENbMaMWWv2G3TZ@qRt7SEYocUftofuOpOsfzbyVCuVFqbgAUk58oVkbfPdVAM/FjY3fJrB/cOXNiF9f0v)
Approach inspired by masterX244's [Java solution](https://codegolf.stackexchange.com/a/111141).
[Answer]
# C (GCC), 110 bytes
Function submission.
```
f(){char*s[]={0,"Mine","Theirs","Conflict"};printf("Hello %s",s[/*
<<<<<<<
*/1/*
=======
*/+2/*
>>>>>>>
*/]);}
```
Approach inspired by masterX244's [Java solution](https://codegolf.stackexchange.com/a/111141).
## TIOs
* [mine](https://tio.run/##S9ZNT07@/z9NQ7M6OSOxSKs4Ota22kBHyTczL1VJRykkIzWzqBjIcM7PS8vJTC5RqrUuKMrMK0nTUPJIzcnJV1AFyhZH62txaekbgslYTeva/0AVCrmJmXkaZfmZKZoK1VycQBusuTiLUktKi/IUDKy5av8DAA)
* [theirs](https://tio.run/##S9ZNT07@/z9NQ7M6OSOxSKs4Ota22kBHyTczL1VJRykkIzWzqBjIcM7PS8vJTC5RqrUuKMrMK0nTUPJIzcnJV1AFyhZH62txaelrG4GpWE3r2v9AJQq5iZl5GmX5mSmaCtVcnEArrLk4i1JLSovyFAysuWr/AwA)
* [conflict](https://tio.run/##JY6xCsMgGITn@BQiFNSmJO1q06VLl27dQoZgtRGsFrVdxGe3P/hN93FwnDy8pKxVU5bltgYe52XKY0/uxinSk8emTIgQrt5pa2QiRXyCcUlTclPWeryDNs4DR@cG4sMRbGqA7U@glwbowkSpMIDfq3H0582T4Yw6OCBQF1T6BodHgUr9Aw)
[Answer]
## [Perl 5](https://www.perl.org/), 68 bytes
Updated after realising that the version with 6 of each delimiter works as intended, but with the actual 7 delimiters, it doesn't... Oops...
```
say"Hello ",q
<<<<<<<
!Mine!;0
=======
!Theirs!;0
>>>>>>>
&&Conflict
```
[Try the conflict online!](https://tio.run/##K0gtyjH9/784sVLJIzUnJ19BSaeQywYCuBR9M/NSFa0NuGwhgEsxJCM1s6gYJGQHAVxqas75eWk5mckl////yy8oyczPK/6v62uqZ2BoAAA "Perl 5 – Try It Online")
[Try mine online!](https://tio.run/##K0gtyjH9/784sVLJIzUnJ19BSaeQS9E3My9V0dqAS03NOT8vLSczueT//3/5BSWZ@XnF/3V9TfUMDA0A "Perl 5 – Try It Online")
[Try itheirs online!](https://tio.run/##K0gtyjH9/784sVLJIzUnJ19BSaeQSzEkIzWzqFjR2oBLTc05Py8tJzO55P//f/kFJZn5ecX/dX1N9QwMDQA "Perl 5 – Try It Online")
]