Just use obsidian and the github repo addon so all your notes are not only backed up in a private repo but also with Git revision.
Edit: reading your requirements I’m sure above satisfy them except probably ‘programming notebook’, unless there’s an obsidian addon for that.