Branching out an intermediate version in git

I’ve already posted this on stackoverflow but have only gotten the advice to cherrypick, which I would like to avoid. This is not a Clojure-specific question but I have been very rewarded when I’ve asked questions here before so I’ll try again :blush:

My Clojure app is currently at version 4.10 (git master branch). I have been working for a year on a new major version 5 with a Clojurescript UI. But also refactoring of the database which I would like to get out into production sooner than the full release of version 5. This can be achieved quite easily by creating a new branch, 4.11, and deleting the files with the new UI features and changing 3-4 files that refer to these files.

However, then I am in the situation where v4.11 is a branch of v5. I know that I will need to release at least v4.12 and maybe v4.13 before v5 is released.

I’m totally confused as to where the development of v4.12 should take place. I can’t do it in the v4.11 branch and merge back to v5, because then all the deletions will also be applied to v5. And if I do it in the v5 branch and merge into v4.11, the further development of v5 will also follow along.

In hindsight I should have realized that the database refactoring should have been done on a feature branch from the v4.10 master, but that is too late.

Any advice?

(Link to SO question branching and merging - Create intermediate version from feature branch in git - Stack Overflow)