Reputation: 803
I know that there are some questions with this topic but out of them I didn't get a answer for my problem.
I am working with Bitbucket and I am not sure if I am always doing all corretly because I am very new at Bitbucket
I have a conflict at merging a branch into master.
// Check if a filter is set
if(filter_id) {
var filter = filter_id;
+<<<<<<< destination:b9a9e6b6e3b21d06f9f726ba8a3b24c221c695f4
}
else {
var filter = -1;
}
+=======
+ }
+ else {
+ var filter = -1;
+ }
+>>>>>>> source:8ab52e4f8401ac8b5b68682d888e7538a7183216
Do you have any idea how I can fix this error? Maybe by modifying the code?
What does this conflict mean in general? What have I done wrong?
Thank you for your answers!
Upvotes: 2
Views: 12898
Reputation: 1248
It means that both the branch you are merging onto and the branch you are merging in have changes affecting those lines. git can't tell which version of those lines is the one you want to keep, so it stops the merge and lets you solve the conflict yourself. It does this by keeping both versions of the affected lines, separated by ======
. The <<<<<
and >>>>>
lines indicate where the conflict begins and where it ends.
You solve the conflict by manually editing the affected file. In your case, it looks like it's just a whitespace change, so you can delete one of the two repeated
}
else {
var filter = -1;
}
sections, as well as the +<<<<<<< destination:b9a9e6b6e3b21d06f9f726ba8a3b24c221c695f4
, +=======
, and +>>>>>>> source:8ab52e4f8401ac8b5b68682d888e7538a7183216
lines.
For more information on merging it git, read this.
Upvotes: 6