Skip to content

Instantly share code, notes, and snippets.

@foxsake
Last active May 2, 2017 08:58
Show Gist options
  • Save foxsake/c2749a9b3d6167de464db7771f9a530e to your computer and use it in GitHub Desktop.
Save foxsake/c2749a9b3d6167de464db7771f9a530e to your computer and use it in GitHub Desktop.
git remote push to >1 repos

Push to 2 different repository git

Step1: Create first remote

git remote add all git://original/repository.git

Step2: Add second remote

git remote set-url --add --push all git://another/repository.git

Step3: Add the original repo again.

git remote set-url --add --push all git://original/repository.git

To check

git config -l | grep '^remote\.all'

there should be 4 and the added pushurl should be there.

To add more reporsitory just repeat step2.

source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment