Lets say i am working on directory /Users/UserName/Documents/Repos/ProjectX. After each successful feature complete, I comit my changes. Now what I want to is to push these changes to multiple repos. Can i do this under git ?
Asked
Active
Viewed 24 times
0
Em Ae
- 7,519
- 22
- 73
- 143
-
4Possible duplicate of [pull/push from multiple remote locations](http://stackoverflow.com/questions/849308/pull-push-from-multiple-remote-locations) – emlai Feb 10 '16 at 01:10
1 Answers
1
You need to define a remote for each repository you want to push to.
Define a remote using this form:
git remote add repo1 <url>
For example, if pushing to the Linux Kernel the remote command would look like this:
git remote add repo1 https://github.com/torvalds/linux.git
Then, when you push, explicitly reference that remote:
git push repo1 master
Learn more about managing remotes here.
Jonathan.Brink
- 21,521
- 16
- 66
- 107