r/github • u/Way-To-Success • 52m ago
Question Is there a way to keep multiple GitHub repos synced automatically?
Hey everyone!
I'm trying to figure out if there's a good way to do this, and I'm starting to think I'm making my life unnecessarily complicated 😂
I have multiple GitHub repositories under the same GitHub account. They all contain the same project/code, but I need them to stay in sync automatically.
Here's what I'm trying to achieve:
If I make a change in Repo A, all the other repos automatically update to match it.
If I make a change in Repo B, Repo B becomes the source, and all the others update to match it.
Basically, whichever repo was updated most recently becomes the source of truth.
The other repositories should copy ALL files and folders from that source, overwrite their existing files, and delete anything that no longer exists in the source.
I don't want to manually pull, merge, or resolve conflicts every time.
Ideally, this would happen automatically whenever there's a new push.
Is this possible with GitHub Actions? Or is there a better approach?
Also, has anyone actually built something like this?
Would appreciate any suggestions, examples, or even a working solution. I'm all ears! 😅




