Answer the question
In order to leave comments, you need to log in
Git. One project for two?
Can anyone finally explain how to organize the work of two (or more) people?
Let's say one project SomeProject is written by two developers.
1. Both of them to create a separate repository and merge everything together at the end?
2. Or is one repository enough for one of them, and the second one will be as a guest , push something to its branch? Then under what login and password will he make changes?
There is a lot of information, but I can’t find anything specific to my question!
Can anyone explain in a nutshell?
Answer the question
In order to leave comments, you need to log in
1. One creates, and all rights are behind him
2. Uploads all his files
3. Other developers download all files
4. Edit / add what they need.
5. Before uploading changes, they check if someone has uploaded what, if so, then download and check if there are conflicts or if their code breaks something
6. If everything is good, then they push their changes
There is the concept of branches, they can be both local, see the user is only at home and public, which everyone can see. Local programmers do for themselves; Public, if some module needs to be done for a long time or a good redesign is underway. It's also good to have a production branch that the lead programmers work with, this is the branch of the current state of the production server. The main branch where all programmers upload what they have.
git is a distributed system. Everyone can work for themselves, and push any thread of changes to another repository (with configured access).
You can decide among yourselves which git server you will consider "Main", and you will synchronize with it.
Or better yet, use github.
You should have one central repository (it's easiest to create on github/bitbucket and similar services).
Also, each of you should have your own "copy" of this repository. Everything you do you do in your copies, and when you see fit you "publish" your changes to the central server.
Using github/bitbucket is easier because there is no need to bother with setting up access to the central repository. This setting is a separate issue.
usually one repository and one branch is enough for two people, and both push to the same branch, why is that extra?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question