I asked a question on stackoverflow.com about merge conflict resolution 
after re-factoring.


There is currently no answers, so I decided to ask the same question here.

- Create branch A
- Create branch B

- Checkout A, refactore (extract half of an existing file (text.txt) into a 
new one)
- Commit into A

- Checkout B
- Change text.txt file slightly (both extracted and not extracted parts)
- Commit into B

- Merge A and B

My expectation was: no conflicts, git applies changes on both files 
(original and extracted).
Why I expect this? Because "git gui blame <extracted new file>" is able to 
determine origin of the code,
so git merge in my opinion should be capable to.

Alternative, git could apply changes to both files correctly (as I 
expected), but then generated two merge conflicts
drawing attention to potential wrong conflict resolution. The best solution 
would a configuration option, like "merge.moved"=(yes|conflict|no).

At the mean time git generates one big conflict. Resolving this conflict 
requires deep knowledge about refactoring done to the branch A.

Please, consider original question for details and examples:


Thank you for your comments and workarounds :-)

Kind regards,
Boris Brodski

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to