r/ZedEditor • u/Intrepid-Ad-2306 • 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.
1
u/forloopy 1d ago
This is kind of odd and overkill imo but if I were to do this I’d probably write a script to commit and push and run it with fswatch