Keep git history when splitting a file -


i want take function out of 1 file , put another, keep blame history.

cp a.php b.php  vim b.php # delete 1 function  vim a.php # delete 1 function  git add a.php b.php git commit 

but if run git blame b.php see blaming new commit.

perhaps previous question informative:

how git track source code moved between files?

to paraphrase accepted answer: essentially, git doesn't "store" moved code; when generating things blames moved code, that's done ex post facto examining state of entire repository commit commit.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -