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
  • 307,833
  • 40
  • 508
  • 550
Husein Behboudi Rad
  • 5,344
  • 10
  • 55
  • 114

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
  • 31,036
  • 5
  • 72
  • 73
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,129,465
  • 480
  • 4,036
  • 4,755