2

I have an iOS project in my Xcode. I want to push my changes into two separate git repositories. (One is repository in our local network and the other one is a repository in my servers on Internet). Is there any options to connect the code to two repositories?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Husein Behboudi Rad
  • 5,434
  • 11
  • 57
  • 115

2 Answers2

2

Just add another remote repo - see here

git remote add otherrepo https://github.com/blabla/blub42  

Then you can push to it

git push otherrepo master
DAXaholic
  • 33,312
  • 6
  • 76
  • 74
0

As described here, you can modify your current remote to push to multiple url:

 git remote set-url --add --push origin $(git remote get-url origin)
 git remote set-url --add --push origin /new/url

(you need both commands)

Then a git push would push to both urls.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250