how does git handle merging code that was moved to a different file?

前端 未结 4 630
花落未央
花落未央 2020-12-19 01:38

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

4条回答
  •  一向
    一向 (楼主)
    2020-12-19 02:21

    No, git won't do this level of change. It will notice when you move an entire file; so, for example, if you moved the file, deleted everything else in it, then it might stand a chance of picking up the changes. But it doesn't do a change on a per-subfile or any kind of refactoring.

提交回复
热议问题