Forum Archive

Auto add/commit/push to github in Stash

imnegan

Hi all

So I have Stash up and running in order to backup and sync a project between multiple devices, one of which is a corporate laptop that is locked down so that I’m unable to install Dropbox/Google Drive etc.

Are there any tricks to get Stash (or another workflow) to automatically sync changes to github on the fly, similar to editing a google docs file that saves online as you type, without having to manually got through the mojo-deflating Stash process of

git add stuff.py
git commit
git push

Any suggestions? Totally keen to try non-git and/or non-Stash solutions if they’re out there.

Cheers

JonB

you could certainly create your own script that does

git add *.*
git commit "backup" yourname youremail
git push

and put that in your stash/bin, which lets you do a one liner. You could also create a wrench icon that launches stash and executes a script.

It is also possible, but i really don't reccomend it, to hook into file saves, then do something there.... but trying to push to git inside such a callback probably is not what you would want.

A lot of people like the working copy app, which is git based, and supports drag/drop, and other methods of syncing.