Skip to main content
100%

How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

✓ Published0🌍 Public
Aackuser
Last edited Feb 9, 2016
Created on Sep 1, 2021

This example demonstrates how to configure Git to push a single branch to multiple remote repositories simultaneously, using the command-line interface and manual edits to the `.git/config` file. It shows the `git remote set-url --add --push` command, which modifies the `remote.origin.pushurl` entry, and also covers per-branch push remotes via `branch.<name>.pushRemote` settings, plus fetching from all remotes with `git fetch --all` and merging via octopus merge. The code relies on standard Git APIs and configuration syntax.

AI-generated description

Similar vizzes