Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.
I needed to have two GitHub repositories with the same exact content.
Whenever I pushed my changes, those changes had to be sent to those two repositories without any extra work.
So here’s what I did.
I already had a working repository with some code, set up as the origin remote in Git.
I created a new empty repository on GitHub, and I set it as another URL for the origin remote:
git remote set-url --add --push origin git@github.com:flaviocopes/original.git
git remote set-url --add --push origin git@github.com:flaviocopes/clone.git
That’s it. Now running git push sends the changes to both repositories.