Last active
June 3, 2016 00:12
-
-
Save 80xer/26f686174d3b7e8123cc4182bddbaf5d to your computer and use it in GitHub Desktop.
Git push to multiple repositories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone [email protected]:80xer/study.git | |
$ git remote -v | |
origin [email protected]:80xer/study.git (fetch) | |
origin [email protected]:80xer/study.git (push) | |
$ git config -l | grep '^remote\.' | |
[email protected]:80xer/study.git | |
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* | |
$ git remote add all [email protected]:80xer/study.git | |
$ git remote -v | |
all [email protected]:80xer/study.git (fetch) <-- ADDED | |
all [email protected]:80xer/study.git (push) <-- ADDED | |
origin [email protected]:80xer/study.git (fetch) | |
origin [email protected]:80xer/study.git (push) | |
$ git config -l | grep '^remote\.all' | |
[email protected]:80xer/study.git <-- ADDED | |
remote.all.fetch=+refs/heads/*:refs/remotes/all/* <-- ADDED | |
$ git remote set-url --add --push all [email protected]:user/study.git | |
$ git remote -v | |
all [email protected]:80xer/study.git (fetch) | |
all [email protected]:user/study.git (push) <-- CHANGED | |
origin [email protected]:80xer/study.git (fetch) | |
origin [email protected]:80xer/study.git (push) | |
$ git config -l | grep '^remote\.all' | |
[email protected]:80xer/study.git | |
remote.all.fetch=+refs/heads/*:refs/remotes/all/* | |
[email protected]:user/study.git <-- ADDED | |
$ git remote set-url --add --push all [email protected]:80xer/study.git | |
$ git remote -v | |
all [email protected]:80xer/study.git (fetch) | |
all [email protected]:user/study.git (push) | |
all [email protected]:80xer/study.git (push) <-- ADDED | |
origin [email protected]:80xer/study.git (fetch) | |
origin [email protected]:80xer/study.git (push) | |
$ git config -l | grep '^remote\.all' | |
[email protected]:80xer/study.git | |
remote.all.fetch=+refs/heads/*:refs/remotes/all/* | |
[email protected]:user/study.git | |
[email protected]:80xer/study.git <-- ADDED |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment