You are not logged in.
Pages: 1
So we had a power outage at my college today and a bunch of seniors were angry coz they hadn't saved when the power went out and lost hours of work. Sucks to be them. Anyways, I save regularly and I also version control all my files using Git and this gave me and idea. I would like to be able to set things up so that whenever I make a change to a git controlled file and save it, Git records it but not actually as an individual commit with a message. This way every change I made is added to version control and i'm not stuck with just linear undo and redo. However, I'm not an advanced Git user by any means so i don't know how I could go about setting this up. I'm also mostly a Emacs user, so ideally I would be able to browse these microcommits and reload them at will. When I'm done for one session i can make an actual commit with a proper message. Any ideas on how to set this up?
Thanks,
Basu
The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github
Offline
Look on lifehacker, there is a tool that does this that was featured recently.
[git] | [AURpkgs] | [arch-games]
Offline
I believe there's a way to execute a command each time you save a given file with emacs.
(don't ask me, I'm a vim user)
So you could just do something like
git commit -a -m $(date)
but not sure this is useful.
Theres's also stgit that could be useful.
EDIT: http://lifehacker.com/5232049/flashbake … dy-writers
(funny to see this software is also a git interface written in Python ...)
Offline
Stupid idea imho. If it is saved, it is on the disc. If you save only every few hours, you're to blame. If you have critical a power supply, get an USV. It is nowhere safer to have each change in a vcs.
Offline
I have heard about flashbake and I think I'll look into. However, I would like to be able to 'hide' or fold these auto commits from view when I see the git logs (not sure if that's possible). Also I'd like to be able to quickly browse the recent autocommits (preferably from inside Emacs). Can anyone recommend Git elisp packages that can do what I'm looking for. Additionally if there is an emacs package that allows non-linear undo/restore, I could not go the VCS route.
@bwalk, I don't think you quite understood what I meant. I do backup regularly (hitting C-x C-s has become something of a reflex whenever I pause typing), but I would like the individual changes to be saved so that I could browse and rollback without depending on a linear undo buffer.
The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github
Offline
Pages: 1