Git merge on psychopy builder (.psyexp) files (custom .psyexp merge filter?)

I am frequently re-using similar experiments using git branches, but I find that the way psychopy builder stores the experiments makes this somewhat hard.

First, an example, where I am currently running into a lot of problems:

I have an experiment that was developed (simplified) in the following fashion:

Base version → Change 1 → Change 2

So now I want to create a version that should look like follows:

Base version → Change 2

I have done similar things with git before, but with Psychopy (at least if I use code blocks) this is very hard to do.

The problem is that psychopy stores the code blocks in a single line in an XML file, so if Change 1 changes one line in a block, and Change 2 changes another line, then I can only pick the complete base, change 1 or change 2 versions (which includes change 1). But it is not possible to actually merge the code block. Similarly, I can’t just git revert change 1, because it won’t recognize which parts of the line were changed.

Is there a better way to handle code blocks in merges? Or is there an overall to do feature based development in psychopy?

I am currently contemplating on writing a custom git merge filter that could allow merging of psychopy files. This merge filter would just extract code blocks and then provide a way to merge these single blocks. Is there any interest in such a merge filter, or am I the only one who tries to get feature based development into psychopy?