-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Highest
-
None
-
Affects Version/s: 2.6, 2.7
-
Component/s: Git
-
None
-
Environment:
Mac Os X El Capitan v10.11.6 (15G1510)
Sourcetree standalone app 2.7 (152)
-
Severity 2 - Major
Given I am in a local git repository
And I am on branch "br1"
And "br1" is currently at commit "c1"
And my working directory contains a file named "some_file"
And "some_file" is tracked by git
And there exists a second branch "br2"
And "br2" is at the same commit "c1" as "br1"
When I commit "some_file" deletion on "br1"
And I checkout branch "br2"
Then "br1" is at commit "c2" > "c1"
And "br2" is at commit "c1"
And current branch is "br2"
When I commit an updated version of "some_file" on "br2"
Then "br2" is at commit "c3" != "c2"
When I switch back to branch "br1"
And I merge "br2" into "br1"
Then a "deleted/modified file" conflict for "some_file" is reported by git
When I use Sourcetree's Resolve Conflicts > Resolve Using "Mine", I expect to confirm the deletion of "some_file".
Instead, your working directory contains "some_file" with the content committed in "br2".
This scenario is the same as if you had chosen Resolve Conflicts > Resolve Using "Theirs".
This behaviour is different than plain command-line Git's, which allows you to "git add/rm "some_file"" to either:
- "add" "some_file" back from "br2" (similar to "resolve using theirs"), or
- "rm" "some_file" confirming "br1"'s change (similar to expected "resolve using mine").