I tried and got tired of it, switched to Syncthing a few years ago and an very happy with it.
ObsidianMD
Unofficial Lemmy community for https://obsidian.md/
Same, syncthing has been the best solution for getting the vault on the phone. I do still use the git plugin on my desktop as a way of ensuring I don't mess up notes on the phone, managing sync conflicts and backing up my notes to a self hosted forgejo.
Have a 3 way sync between an always on server, my desktop, and my phone.
Syncthing the way to go. Haven't switched to the fork on Android yet though.
I created a plugin to sync with GitHub on all platforms, it has some bugs that I need to find the time to fix but it does the job most of the times.
If you want to give it a try here it’s called GitHub Gitless Sync. https://github.com/silvanocerza/github-gitless-sync
Mind that you won’t have the full control of a git repo this way.
I used it for a bit and it is working quite well with small vaults. But the memory issue is real - by now obsidian always crashes when I try to sync via git on Android as my vault increased in size by quite a bit.
i found this recently. yet to give it a try but looks promising!
I'm using it like couple of months, works ok