git push to multiple repositories simultaneously [duplicate]

I don’t think you can do it just by setting a flag on git, but you can modify a config file that will allow you to push to multiple remote repositories without manually typing them all in (well only typing them in the first time and not after)

In the .git/config file you can add multiple urls to a defined remote:

[remote "all"]
    url=ssh://user@server/repos/g0.git
    url=ssh://user@server/repos/g1.git

If you git push all now you push to all the remote urls.

Leave a Comment