The summary of those links is: include userdata (e.g. /var/lib/openhab) as well as conf (i.e. /etc/openhab). You should definitely exclude the cache, tmp, and backup folders. Other folders (e.g. persistence) you can decide.
Even if you put all your configs from the conf folder into git and did no configuration through the UI, you’d want to include userdata in your git to have the full configruation.
Yes, I wasn’t thinking about a manual install. On an apt/yum install, the logs are in /var/log/openhab but in a manual install they are in userdata (Docker uses a manual install). Other bindings may also have folders there that should/should not be included.
Yeah, there definitely might be some other folders in userdata depending on what bindings you use. I pointed out some of the more annoying ones (for me at least) that tend to cause a lot of noise for git.