Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Using WIP branches to save every edit (jukie.net)
30 points by rlm on Jan 3, 2010 | hide | past | favorite | 10 comments


It's a really useful time save.

Unfortunaly git-wip by default doesn't commit files that are untracked (e.g. new). I submitted a patch to do exactly this: http://github.com/MSch/git-wip/commit/22f4b57b67762a0123d1ba...


Why not have a daemon track for file state changes instead of having every editor run the git wip command? That would be much more general and probably better for most projects.

Maybe I'll make such a daemon...


A custom daemon would be great, but meanwhile you could use inotify-tools from the shell:

  while inotifywait -r -e modify .
  do
    git wip save "automatic save"
  done


Doesn't "tripwire" allow something like that? I'm not personally familiar with it and don't use it, but I'm sure I've seen something about it.


From my understanding of it that is how dropbox operates. Updating after every file save by hooking into the file system somehow.


This is timely considering just last night I "rm -rf projectname.py" instead of "rm -rf projectname.sqlite". D'oh.


Anyone have it working in Emacs? I may fool around with it tonight, if not, and see if I can get it working.


I'm a vim guy myself, but looks like you just need the onSave hook that the vi config at the end calls.


this should be integrated into editors as undo/redo

i've long thought proper version control makes sense if it's fast enough -- eventually everything will be tracked anyway.

it doesn't make any sense to lose any ideas just because only one of them was "the winner".


How does this compare with git stash?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: