I have a master
branch and a development
branch that are merged. Now I did a major refactor on a develop_new
branch and I'd like to merge it to the master
.
The problem is that the differences between developement
and development_new
are huge and if I merge it normally I'll have lots of unused files from the development
inside the master
.
What should be the correct approach assuming that I want to have in the master
the history of the old commits?
One possible approach that I'm considering is to create a new branch from the master
, let call it cleanUpBranch
, delete all files and merge it with the master to delete everything, then merge the development_new
. I believe this works but I'd like to know if there is any better approach.
I considered the rebase command but because I'd like to keep the history I don't think it's possible.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…