Commit ef1fcfd2 authored by Sadman Kazi's avatar Sadman Kazi

Add pushing to multiple remotes

parent b04a594c
......@@ -25,6 +25,7 @@ Table of Contents:
### Git
* [Configuring using `git config`](git/
* [Pushing to multiple remote repos](git/
* [Useful aliases: `push --force-with-lease`](git/
### Linux
Pushing to multiple remote repos
Multiple remote URLs can be set to the same remote using the `remote set-url REMOTE_NAME --STREAM --add REMOTE_URL`
command. For example, say we want to assign two different URLs `` (as a `push`
mirror) and `` (original repo) to the same remote `origin`, we can issue
the following commands:
$ git remote add origin
$ git remote set-url origin --push --add
$ git remote set-url origin --push --add
> Leaving out `--push` will make the remote `pull`-able, which might not be safe.
We can check the current list of URLs attached to all the remotes:
$ git remote -v
origin (fetch)
origin (push)
origin (push)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment