Re: Dumb "continuous" commit dumb question

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Pat LeSmithe <qed777@...>
Cc: <git@...>
Date: Tuesday, August 19, 2008 - 10:32 am

On Tue, Aug 19, 2008 at 4:47 AM, Pat LeSmithe <qed777@gmail.com> wrote:

What I do is have a script that runs every 10 minutes that stages
files to the index and then, using the low-level git plumbing, creates
tree and commit objects on a side branch "temp". With this you can
easily commit to the main branch "main" PROVIDING you are commiting a
superset of the changes you're storing to the side-branch. If you
wanted to specify exactly the things in your "main" commit I suspect
you'd have to do some kind of "git-reset --mixed" to rollback the
side-branch state. One thing to be aware of if you do this is that git
expects your index file to be describing what you intend to do on the
current branch you are on (in, eg, git status), but by doing it this
way you'll get output that acts as if you've staged things for your
"main" branch.

This isn't a problem for me as my (idiosyncratic) usage is to have
commits on my main branch every hour via cron anyway.

If you're particularly interested in this approach I can either try
and explain the commands I use in email or you can try and extract
them from my python script chronoversion:

http://www.personal.rdg.ac.uk/~sis05dst/chronoversion.tgz


I actually find I don't use the temp branch to actually undo stuff
(partly because I'm not even trying to keep a neat history so I do
modifications primarily via new commits). Instead, I sometimes modify
and extend my research code in a way that I do maybe an hour or so of
new code and refactoring before it's in a state to actually run again.
If when it finally runs something's broken I find it very helpful to
be able to look backwards to see what changes I've made as the problem
either jumps out or I know where to start experimenting.

One problem with chronological backups is that they often don't
compile/run so you can't bisect on them. One thing I have been trying
to figure out is if there's an easy way to modify my build system so
that it makes a commit approximately every 10 minutes but just after a
successful compile. However, that looks to be a bit too complex and
error prone for the moment.

-- 
cheers, dave tweed__________________________
david.tweed@gmail.com
Rm 124, School of Systems Engineering, University of Reading.
"while having code so boring anyone can maintain it, use Python." --
attempted insult seen on slashdot
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Dumb "continuous" commit dumb question, Pat LeSmithe, (Mon Aug 18, 11:47 pm)
Re: Dumb "continuous" commit dumb question, David Tweed, (Tue Aug 19, 10:32 am)
Re: Dumb "continuous" commit dumb question, Avery Pennarun, (Tue Aug 19, 10:54 am)
Re: Dumb "continuous" commit dumb question, David Tweed, (Tue Aug 19, 11:02 am)
Re: Dumb "continuous" commit dumb question, Avery Pennarun, (Tue Aug 19, 11:08 am)
Re: Dumb "continuous" commit dumb question, David Tweed, (Tue Aug 19, 11:21 am)
Re: Dumb "continuous" commit dumb question, Shawn O. Pearce, (Tue Aug 19, 10:48 am)
Re: Dumb "continuous" commit dumb question, Jeff King, (Tue Aug 19, 1:55 pm)
Re: Dumb "continuous" commit dumb question, Marcus Griep, (Tue Aug 19, 12:13 am)