4 ms·
Here is the problem: 1- You finished your work, so you pull from the central repository, and merge your your branch to the master 2- You do your merge work, t
by GuB-42 6y ago
Here is the problem:
1- You finished your work, so you pull from the central repository, and merge your your branch to the master
2- You do your merge work, test it a bit and commit
3- Now, you push and oops, another team did the same, you are now left with to heads
4- You merge or rebase the two heads. Probably a simple task, but you may still need to run some tests again. And if you are lucky, you are done, otherwise, back to step 3
Also, if you are rebasing before push, you should be able to keep a clean history. However, if you are merging, and there are good reasons for a "merge only" policy, you are going to have a mess of merge commits every time the previous situation happens.
That's something you can work around with good management. But the more freedom you give individual teams to push to the common branches, the more that situation will arise, the more you try to control access, the more chance you will have for teams to go in different directions, making the merges infrequent but tricky.
- user5994461 6y agoThe CI should run tests and take care of merging to master, only after the tests passed. This avoids most problems.
- cs-szazz 6y agoWhen you say "But the more freedom you give individual teams to push to the common branches", what do you mean? I've typically only seen CI merge to master, and disable pushing.