3 ms·
It is absolutely possible to do this in git. It helps if you forget about "files" as something to "move". I did it in the project I'm working on now! It origin
by blasdel 17y ago
It is absolutely possible to do this in git. It helps if you forget about "files" as something to "move".
I did it in the project I'm working on now! It originally had one main repository, and another for an extension that was used as a git submodule in the main one. Active development proceeded in both, with shitloads of commits in the main one just to update the reference to the submodule.
I decided this was retarded, so I took a clone of the extension repository, used filter-branch to rewrite it's entire history so that all the paths were always prefixed with "vendor/extensions/project_name/", and pushed it as an unrelated branch into the main repository.
Then in the main repository I made a new branch, removed the old submodule junk there, did a nice clean merge that melded all the commits from the extension branch going back in time, and made that the new master branch.