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

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

php - How can I merge Nodes & Webform Submissions into instances of one general Content Type in Drupal 6? -

xslt - Umbraco and EXSLT sets do not work -