Reputation: 5986
I'm about to start a new project and this time I will work with a peer. We want to use git (of course) to manage our code and we want to create a separate branch for each feature. We have also decided I will focus on the front-end while "the peer" will work on the back-end. Because of that "the peer" will never complete a feature by himself but once done I will take his code and complete the feature with the front-end. To achieve so I think the best way it is to add his repository as a remote of mine. My repo will have 2 remotes, 1 my "peer" local repo and 1 hosted online. I pull the feature branch for "the peer" repo and push the completed feature online.
Here my question: how can I know the URL of "the peer" local repo? How can I know what to put instead of question marks in the command below?
git remote add peer ????
My machine and "the peer"'s one are in the same network.
Thanks for your help and have a nice day.
Upvotes: 1
Views: 8149
Reputation: 301407
If you have ssh access to the other repo:
git remote add peer username@host:/path/to/repository.git
Easier way: Setup a private repo on BitBucket and both of you start pushing to / pulling from that.
Upvotes: 2
Reputation: 2809
Your peer can install an ssh server on his machine and let you to log in to access his repository. If you have this set up, then the remote address would be something like the following
username@peer-machine:/path/to/the/repository
Upvotes: 1