Last active
October 17, 2017 02:59
-
-
Save zokeber/6403020 to your computer and use it in GitHub Desktop.
Git pull/push from multiple remote locations
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
| Step 1 - Add repositories primary server: | |
| touch README.md | |
| git init | |
| git add README.md | |
| git commit -m "Initial commit" | |
| git remote add origin git@remote-server1:repositories1/app | |
| git push -u origin master | |
| Step 2 - Add repositories alternative server: | |
| git remote add alter git@remote-server2:repositories2/app | |
| git remote update | |
| git pull alter master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment