Obsidian has a git plugin that I've been using for a while. It's pretty configurable for frequency of commits, and I've never had a problem with it.
It is at the end of the day a directory of Markdown files, so it's flexible with other tools. I have a bunch of things like Markdownload configured to write into various sub-directories.
I also use git to make backups of my org-mode files. I made a simple script in git bash for windows to commit changes to local repo and then push to a remote repo. I did this because I discovered that dropbox was no longer versioning my org files as I expected. Not sure why but I'm way more comfortable with a local and remote git repo. I run the script several times a day. There are libraries for emacs that can automate this process but I haven't bothered.
It could be worth looking at Wiki.js (https://js.wiki/). It's not perfect, but I started using a self hosted instance recently and it has worked out ok so far. With markdown and git sync it doesn't feel like I'm stuck if I want to move on to something else in the future, or if I want to do some automation/scripting with the contents.
The obvious solution is to keep files in dropbox or google drive. This handles sync but not backup. I'm not sure about dropbox, but I know google drive is a nightmare to backup. You can use a few paid services to backup google drive, but you then need some kind of alerting to know when it's not running. Having to rely on a cloud storage service and a cloud backup storage does not give me long term confidence. I want something that works on most devices, is as future proof as possible and keep me in control of my data as much as possible.
Another option would be to use git to store notes, but I ran into problems when I tried to set up an auto commit and auto push. I couldn't get it working reliably. Some kind of auto pull would also be needed. Git just isn't designed to work like this so it seems like any setup would be janky at best.
Some options I've considered:
My ultimate solution would be this: I know my needs are different to most. My ideal setup is based on my deep understanding of tech, containerization, cloud and the cloud. The reason my ideal setup does not exist is likely because throwing a few docker containers up on a server is a non-trivial task for most people, and a desirable thing to maintain for even less people.I'm still looking for my golden tool. Right now, I've actually gone back to evernote. It's "good enough" at its core task of note taking, but for someone with an eye to build a personal knowledge base over the rest of my career (20 years left), I'm still looking for the ideal tool.