A merge a day keeps the conflicts away

June 16, 2021
Merge a minimum of one PR each day. Make small PRs. Don't worry if the feature is incomplete, only that each PR works.

At one of the clients I’m helping, I did something last week that made me feel slightly bad.

I merged a pull request that refactored a couple database methods.

Why did I feel bad?

Because it broke another developer’s work in progress.

He end up with some accidental reversions, due to bad merge conflict resolution, and ultimately ended up completely abandoning a week-old feature branch and starting from scratch.

But then again, I felt only slightly bad. Why only slightly?

Because the real failure here wasn’t my refactor, it was the week-old feature branch.

Today I started coaching this other developer on the how-and-why of real continuous integration: the practice of merging into master multiple times per day.

I started with the simple guideline: He should be merging a minimum of one of your PRs each day. So I asked him to make small PRs, and not worry if the feature is complete, only that each PR works.


Related Content

The poor man's feature flag

How to use feature flags if you don't have feature flags.

Continuous Integration doesn't work for mobile, because...

Actually, CI does work for mobile. But Continous Deployment may not.

What is the ROI of Test-Driven Development?

Common break-even calculations for TDD are wrong when experienced TDD devs are involved becuase TDD makes development faster.