Why doesn't git cherry-pick override modification in current branch if their is different?
问题 Look, I make a modification in a branch and then pick a commit from a similar branch, which does not have this modification. I wonder if modification must be rolled back or not. Initially, both A and B branches have a full copy of the same file begin 123 456 def f 789 klm end But they diverge. First, A moves def f into the end of file, producing refactored A begin 123 456 789 klm end def f Now, if we cherry-pick B on top of this A, the original file is recovered ( def f is back in the middle