Skip to content

Instantly share code, notes, and snippets.

@zokeber
Last active October 17, 2017 02:59
Show Gist options
  • Select an option

  • Save zokeber/6403020 to your computer and use it in GitHub Desktop.

Select an option

Save zokeber/6403020 to your computer and use it in GitHub Desktop.
Git pull/push from multiple remote locations
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