Closed Lomiren closed 4 years ago
Hi lomiren,
Is it possible for you to remove the old branches before you use tomono script? Alternatively, this is a bit cheeky but it would work: since branches are copied to the same name in the final monorepo, you could do a full migration and later remove all the branches on the final repo :)
Like this:
... tomono.sh
cd core
git checkout master
git branch | grep -v '^\*' | xargs git branch -D
This would leave you with just the master branch.
I'm not sure I understand this bit; what are developer pods? Are they just git repositories like the main projects? Then you can use a /
in the directory name to put them in that subdirectory. See the README for further info, but essentially your repos.txt would look like this:
git@github.com:Lomiren/project1.git project1 projects/project1
git@github.com:Lomiren/project2.git project2 projects/project2
git@github.com:Lomiren/devPod1.git devPod1 developerPods/devPod1
git@github.com:Lomiren/devPod2.git devPod2 developerPods/devPod2
Hope this helps. Good luck!
Developer pods Yes. They are just git repositories. And my repos.txt look like in documentation, it's all right.
Only Master. No I can't delete branches before use tomono. Other developers use it while i try to crate monorepo :) I try to use git checkout master git branch | grep -v '^*' | xargs git branch -D
Local branches was deleted. But they stay in remote.
I just want get new monerepo with "master" branch without copy old branches
to delete them in remote, use git branch | grep -v '^*' | xargs git push --delete origin
before the last line (after creating a fresh monorepo). This is by far the simplest solution because it doesn't require any code change and you only need to do it once. Then do the last line to delete them locally, as well.
Although, come to think of it; why do they live on remote in the first place? the tomono script doesn't create an origin remote for you, so where are these branches coming from?
Hi.
Could you add the ability to create a clean new repository where the commit history of several projects is preserved, but the old branches are not migrated. I want to combine several of my projects which are already several years in one monorepository to get something like this: . core/ . . projects/ . . . project1 (use devPod1,devPod2,devPod3...) . . . project2 (use devPod1,devPod2,devPod3...) . . . projetct3 (use devPod1, devPod3...) . . developerPods . . . devPod1 . . . devPod2 . . . devPod3