The setup:
- a laptop L
- an office server hosting various repositories SOffice
- a customer’s database server SCustomer
I’m writing code on L for a customer, and regularly want to push it both to SOffice as well as SCustomer.
I know I could use a changegroup hook to push to a third repository from the second (as described in this answer), but this requires that the second can reach the third network-wise.
In my case, each is behind a firewall, and only my laptop typically accesses both through a VPN (or by being physically there). I could set up the VPN on SOffice to get to SCustomer, but I’d rather not.
Is there a way I can, say, set default to two repositories?
There’s a MultirepoExtension that adds commands for doing any operation on multiple repositories.
Or you could create an alias to push to both like:
or you could create a pre-push hook that pushes to the other one. Something like:
But I like (and upvoted) krtek’s answer the most. Just give each a path alias and run push twice with the short names instead of the URLs.