This question came to me after reading this one : Can Git really track the movement of a single function from 1 file to another? If so, how?
Here is the worfklow :
A "long time ago", we splitted a big file folder/file.py
in many files : folder1/file.py
, folder2/file.py
and so on.
git blame -C
shows correctly the history of that code when we look at folder2/file.py
, we see that some of the commits were made before this splitting.
The problem is that we continue to maintain old versions of the code that still have folder/file.py
and when we merge the fixes back in the "current" version, git keeps re-creating the folder folder
and does not see that a fix made to folder/file.py
should be merged into folder1/file.py
OR folder2/file.py
depending on where this chunk of code is now located.
I look rapidly at git help merge
but did not find anything about that.