Sublime Forum

A Plugin to Autosync with a Git Repo?



I have searched both here and using a search engine, but haven’t found any information on whether it is possible to get ST to auto-synchronize a local folder with a git repo.

Say, I have a private repo with .md files on Gitlab. What I need is that ST scans the local folder and the repo at its start and in the process of file editing - and uploads/downloads files that were changed.

Basically, it is the principle of cloud storage auto-sync apps, like Dropbox, or Google Drive, or Mega.



Using git for Auto-Synchronisation is not a good idea. Git permanently stores old versions of files, so making a commit every couple seconds would explode the size of the repository and make it difficult to get any overview of files changing over time. I also don’t think this kind of thing should be editor-specific, there isn’t really anything ST does that would help write such a thing, and you would likely be missing files changing from other sources.



Isn’t it possible to commit to the master copy and overwrite the edited text? No copies will emerge this way.



You could continuously amend, but then you won’t get any history whatsoever (unlike Dropbox which does keep history). Doing so would also remove any possibility of conflict resolution, as you’d be force pushing every time.

1 Like


@bschaaf, I see, thanks. I don’t need backups within git though, because the Android notepad app I tried to use saves backups separately, in the Android filesystem.

I can explain why I wanted this. Someone has come up with a really good idea of using git for notetaking. I think it’s a great protocol for this, in theory. The Android program is called GitJournal. It’s the first such app, with no alternatives so far.

But today, as I did more testing, I discovered it is still quite glitchy and I won’t go for it. Will just use a dedicated markdown editor and Dropbox syncing - it isn’t perfect but it still works.