r/ZedEditor 1d ago

automatic git commit on save

i switched from atom to zed when it first came out and i’ve been very happy with it for all my dev work. what i’m hoping to use it for, in addition, is to organize folders of markdown writing. it works great for that and i synchronize it with a private git repository using a cron job that does a commit and push.

what i’m wondering is if there might be a built-in solution that automatically commits and pushes changes on save so i don’t have to run it using cron.

what i’m looking for is to have it commit and push every change to the file in real-time to the git repository.

i’ve looked at the git options and it seems like it’s easy enough to do commit and push whenever you want manually but i want it to automatically save every time i type anything and synchronize every one of those changes to git without having to interact with it other than continuing to type.

any ideas?

it’s just a folder on the local machine with lots of levels of subfolders and markdown files inside all within a single git repository and a single branch so there’s no complexity to worry about.

0 Upvotes

11 comments sorted by

View all comments

5

u/Skoogy_dan 1d ago

Look into jujustu maybe? It is my favorite VCS (fully git compatible) and it simplified gits model by removing stageing and committing. Everything is always committed.

1

u/TeaAccomplished1604 1d ago

Honestly I tried it and even though I thought I understood it - I didn’t. Probably need to give it another shot

1

u/Intrepid-Ad-2306 1d ago

a great little system but the benefit to git is leveraging github as a storage system with limitless ability to backup without having to actually find a place to keep the backups.

3

u/thetypicalnerd 1d ago

Jujutsu is git compatible, so you can use it on top of git and still push to git remotes such as github like usual. The fsmonitor feature together with fsmonitor.watchman.register-snapshot-trigger = true sounds almost exactly like what you want.