Skip to content

Little demo to keep Git history when splitting a file (blame)

Notifications You must be signed in to change notification settings

piRGoif/split_preserve_history

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

split_preserve_history

Little demo to keep Git history when splitting a file (blame).

Principle :

  • we want to split file A content
  • create a branch, rename A to C and change code as needed
  • on the original branch, move A to B and change code as needed
  • merge branches, resolve conflict
  • you get files B and C all of which contains A history !

Found this procedure in this excellent article : Splitting files while preserving history in git — musicmatzes blog.

Other resources on the same subject :

See also a tool to automate the process : https://github.com/potherca-bash/git-split-file

About

Little demo to keep Git history when splitting a file (blame)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages