refactoring - How to move function declaration to another file yet retain Git history? -
i refactoring single-file php script declare functions , classes in separate files. how 1 move block of code 1 file file yet preserve git history each individual line? ability use @ least git blame on code. comparing older versions helpful. note not interested in 'workaround' solutions require additional commands or flags (such --follow ) on code view 'old' history, person viewing history have know file needs special treatment. looking solution writes necessary metadata such normal git commands such blame , log , diff , , such 'just work' without presenting them additional flags or arguments. i have read quite few posts looking solutions similar problems , none address issue of git blame on individual lines. 1 solution think work copy file , entire history , work off of that. however, question remains without satisfactory answer. warning: assumes rewriting history acceptable. not use unless know implications of rewriting history. to spl...