> What I'm sure though is that storing the state directly in git and especially alongside the code is the bad way to do it.
Everyone has different priorities. I'd argue that tying your tool specifically to git is a worse problem than dealing with merges.