A tool for combining git repositories without losing history
This is a quickly written package, not tested at all! WOMM.
This is an implementation of the manual process described here.
$ npm install combine-git-repos
var combineGitRepos = require'combine-git-repos'var firstRepo = '/Users/you/full/path/to/firstRepo';var secondRepo = '/Users/you/full/path/to/secondRepo';var targetFolder = '/full/path/to/repoToBeCreated';combineGitReposclonefirstRepo targetFolderthenreturn combineGitReposmergeRepoIntoReposecondRepo newRepo 'folderForSecondRepo';thenconsole.logcatchthrow err;;
In this example I clone the first repo so that it would not be changed. (but do not trust me, play safe!).
As mentioned above, this hasn't been tested. It works on my machine well, but who knows? Use cautiously.