Git push to multiple remotes

Answered

Is there a workflow for pushing to multiple Git remotes in Rider?

I'd rather not hack together a remote that pushes to multiple URLs.

0
3 comments

Hello Jeff

Could you please clarify whether you would like to push a change from a single repository to multiple remotes simultaneously?  

Or do you have multiple repositories and multiple remotes?

There is no option to push to multiple remotes at the same time, but you can choose a target remote repository in Push dialog by clicking on a name of a remote.

0

Thanks Ruslan.

This use case is a single repository, pushed to multiple remotes (i.e mirrors).

I was looking for an equivalent to:

`git push <remote0> <branch> && git push <remote1> <branch> && ... git push <remoteN> <branch>`

It turns out this functionality is rare in source control GUIs, so I wouldn't expect Rider to have it natively.

In the end, I hacked together a proxy git remote using this command recipe:

`git remote add all "<url0>" && git remote set-url --add --push all "<url0>" && ... git remote set-url --add --push all "<urlN>"`

Now I can push to "all", and push to all remote mirror URLs.

N.B. The Rider git remote UI does not appear to support the addition of multiple push URLs per remote, so I had to use the command line to execute the above command recipe.

0

Thank you for sharing your solution with us!

0

Please sign in to leave a comment.