3 ms·
No way to move files between repositories and retain their history. Luke Palmer talked about this a little here: http://lukepalmer.wordpress.com/2008/11/12/ske
by ionfish 17y ago
No way to move files between repositories and retain their history. Luke Palmer talked about this a little here:
http://lukepalmer.wordpress.com/2008/11/12/sketch-of-udon-version-controlpackaging-system/ http://lukepalmer.wordpress.com/2008/11/12/sketch-of-udon-ve...
- windsurfer 17y agogit filter-branch --subdirectory-filter foodir -- --all
- blasdel 17y agoIt 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.