Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine many repos into a new monorepo #23

Closed
redthor opened this issue Sep 13, 2016 · 7 comments
Closed

Combine many repos into a new monorepo #23

redthor opened this issue Sep 13, 2016 · 7 comments

Comments

@redthor
Copy link

redthor commented Sep 13, 2016

Thanks for splitsh-lite.

I have a question. Can I use splitsh-lite to create a new monorepo from many minirepos?

My use case is that we manage our code out of a lot repos which we then bring in via composer. I would like to establish a new monorepo that contains the base application as well as all our internally developed dependencies.

e.g.

.git/
app/
dep1/
dep2/
depN/
@aslakhellesoy
Copy link

I'm also interested in this. I've got several repositories with years of commit history. I'd like to keep that history (at least for the master branch) when I bring them all into the same monorepo.

Is this possible?

@mmunro-ltrr
Copy link

I'm interested in this as well, & rolled some quick and dirty demonstrations to show what might work. There's a project spread over many repositories at the moment, each with their own histories. A simple invocation of the standard command-line git can combine these into a monorepo (see https://bitbucket.org/mmunro-ltrr/uaqs_repository_tools for a shell script that does this). The current version of splitsh-lite doesn't preserve the histories of the combined repositories, but there's a hacked-around fork at https://github.com/ltrr-arizona-edu/lite that will do this. I've just been re-basing the extra code on top of the updates that appear here, but now might be the time to tidy it up & make a proper pull request.

@aslakhellesoy
Copy link

Thanks for the pointers @mmunro-ltrr - very useful!

@redthor
Copy link
Author

redthor commented Sep 20, 2016

Yes, thanks @mmunro-ltrr - I'm digesting your code at the moment. Cheers!

@benoitc
Copy link

benoitc commented Feb 7, 2017

what's the status of this feature?

@dxops
Copy link

dxops commented Feb 7, 2017

@benoitc please check if it works for you #26

@karser
Copy link

karser commented May 30, 2017

Using tomono I was able to create mono repo from many ones and keep the history.
Notice: Make sure that your git version at least 2.9 or greater.

Usage:

Prepare a list of repositories to merge in a file, for example repos.txt:

git@github.com:mycompany/service-one.git one
git@github.com:mycompany/service-two.git two
git@github.com:mycompany/service-three.git three
$ cat repos.txt | ~/tomono/tomono.sh

This will create a new repository called core, in your current directory.

@fabpot fabpot closed this as completed Mar 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants