upvote
> The one-way pattern is actually how Google uses it internally too, syncing outward from their monorepo to GitHub

Do they not support contributions on the public repos back into the internal monorepo?

reply
There are three ways I've seen it done, though it being Google I assume there's more

One is to try the bidirectional support with copybara itself, thought that usually requires more effort than it's worth.

Another is to have the external repo be the source of truth and then always import into google3. Kythe used to do this at least, though I gather it's not done that way anymore.

The third is to just replicate the patches externally (which is pretty easy to automate or semi-automate on a case by case basis), and verify that a re-copybara-export keeps zero diff

reply
The "supported" workflow is you keep your source of truth in either the monorepo or the external repo. Then you export the current state of the source of truth to keep the mirrors up to date. Then, since we can assume the mirrors are up to date, the inverse transform can be applied to import change requests from the mirrors.

It works well when the assumptions hold, that there isn't large divergence on either side. It can actually be largely automated.

reply