Are atomic multi-repositories pushes possible? #120704
Answered
by
david-wei-01001
xmo-odoo
asked this question in
Repositories
-
Select Topic AreaQuestion BodyWith multi-repo / poly-repo projects, sometimes it's important for repositories to be updated in lockstep (especially when the project is badly managed or only multi-repo because of hype). I know that git supports atomically updating multiple refs since 2.4, and github supports that as well, however is there a good way to perform atomic multi-repo updates? I don't believe github provides repo locks, so an application-side 2PL or similar does not seem possible, and in my experience Github's cross-repository anything are rather limited. |
Beta Was this translation helpful? Give feedback.
Answered by
david-wei-01001
Apr 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of my last update, there isn't a built-in mechanism in Git or GitHub to perform atomic transactions across multiple repositories. Git’s atomic operations generally apply to actions within a single repository, such as updating multiple refs in one push to that repository.
When dealing with multiple repositories (multi-repo or poly-repo), atomicity becomes more complex because each repository has its own commit history and ref namespace. Here are some considerations and potential workarounds:
Submodules/Subtrees: If you want to keep repositories in sync, you could consider using Git submodules or subtrees, which allow one repository to include content from another. However, this doesn'…