Mechanics of moving an other-repo to the monorepo
Once a Bazel monorepo has been setup, a next task is to slowly consume other projects, one-at-a-time. We'll walk through the details of how you perform that operation.
This post assumes you've already done some preliminary work:
You have a monorepo ...
blog.aspect.build3 min read
When migrating a repository with
git-lfsenabled, there are some additional steps. Git internal hooks don’t supply remote information, and the merging step will fail becausegit-lfswill try to smudge objects fromlfsof the default branch instead. We can work around this limitation by turning off smudging and runninggit lfs pullon a specific remote manually.monorepo$ git lfs install --skip-smudge --local monorepo$ git merge other/main --allow-unrelated-histories monorepo$ git lfs pull otherRelated
git-lfsissue number: 1759 (I can't post links)This blog post is really helpful! Thanks Alex!