First, read https://raw.githubusercontent.com/nicl/nicl.github.com/master/_posts/2018-07-12-branching.md.
Now let's take an example from DCR:
https://github.com/guardian/dotcom-rendering/blob/master/src/web/components/MediaMeta.tsx
This file handles media meta for galleries, photos, and videos. It is an example of what the blog post is talking about: it handles different things but doesn't keep branches separate.
To illustrate, look at the following: