When using Git, it may be desired to configure pushes to push to multiple remote repositories (eg. to mirror a repository). These commands can be used to create a new remote which contains one or more remote repositories and set it as the default to push to.
all
remote with the one of the remote repository URL's:git remote add all git@github.com:example1/repository.git
git remote set-url --add --push all git@github.com:example1/repository.git
git remote set-url --add --push all git@github.com:example2/repository.git
git remote set-url --add --push all git@github.com:example3/repository.git
all
remote (in my case the branch is main
):git push -u all main