Say I have function X in file A, and I wanted to move that function to file B. In the meantime, somebody else made changes to function X in file A.
Does git do anyt
I think the real situation is much more complex, but from what I have experienced, git can handle this kind of 3-way merge well.
For example:
One function of a File in branch A was moved to another location in the same file and meanwhile create a branch B to hold it. The difference between branch B and branch A is only the code location change in the same file.
Branch C changed that function.
So, if you do:
$ git rebase --onto B A C
It will automatically merge the change from branch C to the new location of that function in branch B.