git - What is the best way to perform a complex refactoring spanning multiple repositories? -
i need re-organize project using git. project has 3 separate (central) repositories , need move large number of files , forth between them. while doing this, there development going on on each repository, , restructuring take time. have been continuously rebasing refactor branches master in each respective repository.
is there established way of doing sort of complex cross repository refactoring in way preserves history across repositories , takes advantage of git's rename merge logic across repositories, moving repos third one, merge , move back?
effectively, have 3 repositories, a, b, , c. want move files b , c , preserve history. not simple move of 1 directory, large number of individual files being moved new locations, renamed, updated etc. have been working across a, b, , c, moving , updating files, not keep history of files being moved across repositories. imagine possible create new repository d, import a, b, , c sub directories, rebase merge individual commits on a, b, , c 1 new big commit on d make git understand files have been moved across, not removed in 1 place , deleted another, apply changes each individual repository?
you take repo b, clone it, modifications want change files (move locations, rename, update, etc) prepare files repository a. use filter-branch
rewrite history deleting unwanted paths/files. when ready, fetch branch repository a. merge branch master branch. yes, git merge branches different repositories, makes history funny - 2 roots (initial commits) merged @ point.
then same repo c.
Comments
Post a Comment