'https://github.com/GyanPrakashRaj/shelllbaba.git'
-
Make a file containing the git URLs of the repos you want to combine. These can be paths to bare repos (ideally created with
git clone --mir
) or[email protected]:
URLs. This file should be namedsomething.repos
wheresomething
is the name of the new monorepo you want to create. -
Run
./build something.repos
. It will create a directory namedsomething
and incorporate all the repos listed in the.repos
file. -
After the monorepo is built, look for
empty-repo.txt
andno-branch.txt
files in the subdirectories. These are created if the repo incorporated had either no changes (empty-repo.txt
) or nomaster
branch. In the latter case theno-branch.txt
file will contain a list of the refs from the repo. If there's an appropriate branch (say the repo usedprod
instead ofmaster
) you can fix things up with thepushdown
script. In the monorepo remove theno-branch.txt
and then run./pushdown foo/prod
to put the contents of thefoo/prod
branch into thefoo
subdirectory and merge them tomaster
.
After you've built your monorepo, you'll probably want to push it to GitHub. In the normal case you can probably just create a repo on GitHub and then do the normal:
git remote add origin [email protected]:<whatever>
Then to push everything:
git push --all origin
git push --tags origin
- Kindly ASK before copy or any other changes.
- All right reserved 'https://github.com/GyanPrakashRaj/shelllbaba.git'.