**The scenario**

A long existing bug was spotted out and the problematic commit was found by bisec. So the bug fixer created a branch (say branch `A`), just for all the tags and releases after this point can merge this branch to fix the bug. `A` was then merged to `master`. Everything is fine.

Later on, Another developer that works on branch `B` merged the branch to `master`. After this point, we found that the bug was back.

The merge commit for `B` to `master` shows that it uses `B`'s version and so it effectively reverts the bug fix.

**The commit history**

The following is ordered by time, earlier on top.

1. Commit `c1` -- the branching point of `B` and `master`
2. Commit `c2` -- A commit in `master`, parent: `c1`
3. Commit `c3` -- A bug fix commit that branch in `A`
4. Commit `c4` -- Merge `A` to `master`, parent: `c2` and `c3`
5. Commit `c5` -- A commit in `B`, parent: `c1`
6. Commit `c6` -- Merge `B` to `master`. parent: `c5` and `c4`

Or look at the picture below (earlier on bottom)

![Commit History](https://i.stack.imgur.com/e6yIG.png)

**The facts confirmed**

* `c3` changes only one file `f1`
* both `c2` and `c5` does not change `f1` at all
* `c6`'s comment includes a conflict list, but `f1` is not included
* `c6` reverts `f1` to the `B` version
* Commits that have the bug: `c1`, `c2` and `c5` (all expected), `c6` as well (unexpected).

**Software versions**

Commit `c3` and `c4` was using git 1.9.4.msysgit.0, others was 1.9.5.msysgit.0.

The push was using SourceTree 1.6.14.0.

**Question**

What causes the problem? How to avoid this? Since the change on `f1` is more recent, I can't see any reason that git should use an older version without marking a conflict.

**Further analysis and claims guided from answers**

* The merge of `B` and `master` cannot be a fast forward since `c2` is conflicting with `c5`, as we can see in the conflict list.
* The work done in `c2` and `c5` are on a quite different part of the project (say, the bug is apply to desktop version only but those work is for web version) and people worked for those commits usually never expect that they should test the bug `c3` fixes.
* Although the detail of the project was removed, the graph and the scenario exactly represents something that happened in the real world. The graph is a screenshot from the real project repository.