Thanks for the hint, I’ll have a look at this! Most probably this solves my version controlling needs!
I agree with you that if all configs are already in JSON in the file system (even if they are located in three different places like you wrote), that means that they are already now version controllable (if that is a proper word in English) and thus, this kind of export/import feature that I was thinking out loud is not needed.
You’re correct that it was reworked at some point to conform to a certain design. And that exact point was between Drupal 7 and Drupal 8 when the whole Drupal core was pretty much completely re-written. My point was not to say that the Drupal way is the only right way, it was more intended as an inspiration to our openHAB community. I feel that it’s worth sharing good concepts we’ve seen in other contexts.
For completeness, here is my .gitignore. I run in Docker so $OH_CONF and $OH_USERDATA are in the same root folder. I keep my whole config in git including my internal databases. If you don’t want those you can ignore the userdata/persistence I forgot, I excluded my persistence files a long time ago.
Note that I use a self hosted GitLab so it’s no biggie to include secrets and the openhabcloud folder (which holds the openhab cloud connector secret file) and users are in there somewhere (I think in etc). You’ll see that a lot of bindings have their own folders where they put their own configs too.