git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Tweed" <david.tweed@gmail.com>
To: git@vger.kernel.org
Cc: bfields@fieldses.org, raa.lkml@gmail.com
Subject: Re: Advice on strategy for "temporary" commits
Date: Thu, 8 Mar 2007 17:07:56 +0000	[thread overview]
Message-ID: <e1dab3980703080907v58739287p18bc2797db7d209e@mail.gmail.com> (raw)
In-Reply-To: <20070308163239.GH22713@fieldses.org>

> You don't want to run git-rebase out of a cron job, because it may
> require human interaction.
>
> The simplest thing might be to make the temporary commits onto a
> separate branch, and throw that branch away periodically.

Thanks to you & Alex for suggesting this.

So, at this point I need to ask an embarassingly basic
question: how do I "change branches" from T (say), in order to commit
to a different branch A, without changing the contents of
the working directory back to match what it was at the
time of the last commit to A? (I know this is not the
thing you normally want to do.) Ie, in terms of diagrams
I've got my archival commit branch with its hourly
commits running along the top and the temporary branch
with its temporary commits running along the bottom
and a $ means that, considered just as commited trees
the objects linked are the same:

a-----------a-----------a
 \          $           $
  \-t---t---t---t---t---t---t---t

(In case it's not clear, the "temporary branch" record
extends past the last "archival commit" and throwing
away the temporary commits shouldn't remove any
archival commits.)

So I'm on the temporary branch and have been doing
temporary commits to it and we hit an hour mark.
Cron wants to commit what's _currently_ in my working
directory as a new head to the "archival branch" A
and then swap back the temporary branch to
commit it on that branch and carry on, ie, make
the diagram look like:

a-----------a-----------a-----------a
 \          $           $           $
  \-t---t---t---t---t---t---t---t---t

AIUI neither git-branch nor git-checkout provide
a way to do this. (Clearly the git datastructures
can represent this situation, I'm just not sure how
to ask the tools to do it.)

Again, thanks for all the assistance,
-- 
cheers, dave tweed__________________________
david.tweed@gmail.com
Rm 124, School of Systems Engineering, University of Reading.
Details are all that matters; God dwells there, and you never get to
see Him if you don't struggle to get them right. -- Stephen Jay Gould

  reply	other threads:[~2007-03-08 17:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-08 14:39 Advice on strategy for "temporary" commits David Tweed
2007-03-08 16:11 ` Alex Riesen
2007-03-08 16:32 ` J. Bruce Fields
2007-03-08 17:07   ` David Tweed [this message]
2007-03-08 18:02     ` Mark Wooding
2007-03-09 10:15     ` Jakub Narebski
     [not found]       ` <e1dab3980703102101s21401403ja28c6273ecaa7b83@mail.gmail.com>
2007-03-11  5:22         ` David Tweed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1dab3980703080907v58739287p18bc2797db7d209e@mail.gmail.com \
    --to=david.tweed@gmail.com \
    --cc=bfields@fieldses.org \
    --cc=git@vger.kernel.org \
    --cc=raa.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).