Let's say each person on a team maintains their own repository. One person on the team maintains what is collectively known as the main
repository.
As team members work, they can pull out of the main, but they do not click on the main. During attraction, if there is a merge conflict, this person will correct his own code.
Now, the owner of main
needs at least read access to each member repository. Then the owner of main
pulls from each repository in turn. If there are no merge conflicts, no problem. If there is a conflict, the owner of main
interrupts the commit and allows the person who owns the code to fix the conflict. Let's take a closer look at this detail.
main
pulls from bob
- ok; merger completed and publishedmain
extracts from tom
- conflict; merger canceled- owner
main
tells tom
to display the latest changes and fix the conflict tom
can fix the conflict itself and then tell main
try againmain
pulls from tom
- ok
This process is simply repeated every day, or often your integration cycle.
While this definitely puts a burden on one person, this person should not fix any conflicts, this is work that can be automated with the right motivation. This is how Linus does this to control the kernel.
source share