Open aurabindo opened 8 years ago
That would be fantastic indeed. That's how I use it.
Although, if this is done, I strongly recommend fixing #8 (prettyprinting XML on save) to reduce the number of lines modified every commit.
Having thought about it I don't know if this is worth it in terms of how many corner cases CT would have to handle. If you're using the same document from 2 PCs, with updates not being synced perfectly due to Internet connection loss, you can end up with various conflicts that are typical git PITAs. There's probably other features that are far more important.
Dropbox takes the easy way out of conflicts and creates 2 copies, file.ext (from server) and file.ext.conflicted.timestamp (local copy), and they let you deal with it yourself. I guess CT could do the same?
Anyway, I recommend just setting up an alias:
alias pushct='cd ~/docs && git add notes.ctd && git commit -m "update" && git push'
alias pullct='cd ~/docs && git pull'
It would really be awesome if a git backend can be added so that the user doesnt need to look for another cloud service. If one has a private(or public) git server, then this is the ideal solution for maintaining notes without explicitly needing to take backups.
Having Git integrated into Cherrytree will make it sync seamlessly without the user having to manually save the notes file everyime.