Take the 2-minute tour ×

I'm not a professional programmer, but I do some small solo projects and I would like some versioning and syncing, but going through the process of remember to commit and checkout (on different computers) is more of a hassle than, say, keeping code in a dropbox folder that automatically uploads to the cloud upon file change. Using the current copy is completely transparent to me, but there is no versioning. (Syncing is also a pain because I often don't open my laptop for days after getting home.)

Is there a way to have a codebase automatically commit upon file change (or just every few minutes) and automatically download the latest version if I want to continue my work from another computer?


share|improve this question

migrated from programmers.stackexchange.com Aug 15 '11 at 0:43


Why would you want to do this? What happens when you change your code and it accidental breaks something, but you notice a week later? It will be a bigger pain going back in through all your auto-commits than remembering to commit after you're done working for the day, since you have so many versions to go through, IMO. –  CamelBlues Aug 15 '11 at 1:42
Couldn't agree more, @CamelBlues. Versioning is almost completely useless without the annotations you add in commit messages and the choice of logical places to make commits, like the completion of a feature or bug fix. –  Karl Bielefeldt Aug 15 '11 at 6:44
possible duplicate of Making git auto-commit –  79E09796 Jul 12 '13 at 17:08

2 Answers 2

It depends on what your "projects" are.

Flashbake was created after science-fiction writer Cory Doctorow wanted to automatically capture and version his writing process at regular intervals:

Every 15 minutes, Flashbake looks at any files that you ask it to check (I have it looking at all my fiction-in-progress, my todo list, my file of useful bits of information, and the completed electronic versions of my recent books), and records any changes made since the last check, annotating them with the current timezone on the system-clock, the weather in that timezone as fetched from Google, and the last three headlines with your by-line under them in your blog's RSS feed (I've been characterizing this as "Where am I, what's it like there, and what am I thinking about?"). It also records your computer's uptime. For a future version, I think it'd be fun to have the most recent three songs played by your music player. (source)

It is based on git for versioning, and cron for automatic updates (git is sufficiently space-efficient to make this tractable). You may want to look at another review. The code is here.

If you really, really want file modification detection rather than a commit every X minutes (aka. paranoid about data), you may want something based on inotify (details - note those automated commits may add up quickly !).

Yet another option (that doesn't necessarily solve the auto-commit question, so you may want to mix) is to look at running git over dropbox. This has already been discussed here on SO.

share|improve this answer
Very good answer otherwise, but inotify is about as non resource-intensive as it gets. The process is completely asleep until your editor makes a write call to the operating system. Of course, if you save as often as I do, those commits are going to add up quickly, if that's what you meant. –  Karl Bielefeldt Aug 15 '11 at 6:35
@Karl: yes, this is precisly what I meant. Good catch. Edited to reflect that. –  huitseeker Aug 15 '11 at 9:03

Dropbox keeps few versions of files in history. Hardly can be called "versioning", but you can restore files to some time back in the past.

If you really can not be bothered with commiting and merging, I'd say just live with dropbox, as it is nice and automatic.

You can set up Scheduled Task (if on Windows) or Cron Job (if Linux) that will make a commit/push every 5 minutes. And pull/update every time you start your computer. But I can see a potential nightmare waiting to happen, especially on pull/update, when manual merge is required.

Also, I'd advise using Mercurial, as it is much easier to learn/deal with than git, and more advanced than svn. This will take away some pain from version-control system.

share|improve this answer

Your Answer


