Pat LeSmithe wrote: > Hello, > > Is it possible to enable git to automatically and continuously "softly" > commit or stage *all* changes to a [subset of] files in a repository, > without my intervention, as they happen? Perhaps via a daemon which > monitors the disk for explicit file-saving? Perhaps with a cron job running a script every minute or so. You'd want to verify that changes actually took place before attempting a commit. Also, what log messages would you be providing? Log messages can be very important to the context of a change and the ability to later find them. If you're using a specific application, such as a Wiki, it may work nicely, as log messages can be easily gleaned, and many offer post-edit hooks that you could use to invoke git. > Of course, I would still be able to perform explicit commits (with > descriptive comments) and other git commands, in which case there > probably should be smart handling of the recent soft history. For > example, it could simply be discarded. You may want to use StGit as that may allow you to make such lightweight commits easily while still allowing reordering, etc., though I am not familiar with that application porcelain. > I understand that I could simply remember to commit and/or branch early > and often. But given that changes by an individual on a given branch > are well-ordered by time, and that the "continuous" operation may be > cheap in many situations, a "live" journal could be useful. > > Perhaps a better term is branch-aware undo or git with microstructure. Obviously, my final caution is that while this is possible with some configuration, you may lose valuable "signal" information in the "noise" of commits that such a continuous operation might incur. This low SNR may make it more difficult to find and revert changes you didn't actually want to happen or to glean a meaningful history of your working tree. While in the operable borders of Git, it's outside the normal usage patterns. If you have success, let us know how it worked for you. -- Marcus Griep GPG Key ID: 0x5E968152 —— http://www.boohaunt.net את.ψο´
Attachment:
signature.asc
Description: OpenPGP digital signature