Have you looked at Joplin? It keeps a local copy of the markdown files, and you can sync to a ton of other services – I sync to my personal ownCloud instance, for example. Not sure it’s what you want, exactly – but may be worth a look.