Reputation: 2425
My company have this kind of rules:
This flow created lots of unnecessary merge-conflict when trying make a PR (although if PR with master there is no issue), how can we improve the situation?
Edit: It seems likely my company use trunk based development and use develop branch only for testing ground for new feature (sometimes feature are developed with several branch by different developer)
Upvotes: 0
Views: 2824
Reputation: 53
The biggest portion of git's code is conflict resolution. The smaller your commits and the commits of your colleagues are the better the chance that git can resolve a conflict automatically. Very large commits are mostly the cause of conflicts.
The workflow looks good to me and shouldn't be the root cause of your constant conflicts. Even if I agree that feature branches should be branched from develop.
Upvotes: 0
Reputation: 2375
We follow the following steps in our company. This might be helpful:
This way the master branch will always be clean. Conflicts would be resolved in the feature branches. Also if you want to pull request to master, first merge the latest contents of master branch to your feature branch.
In summery, to minimize the conflicts keep your feature branch up to date with your master branch as frequently as possible. And solve all your conflicts in feature branch to keep master clean.
Upvotes: 1
Reputation: 2691
You can improve this situation in this way:
Let me know if I have to explain any further.
.
Upvotes: 0