From: "Shawn O. Pearce" <spearce@spearce.org>
To: David Tweed <david.tweed@gmail.com>
Cc: Pat LeSmithe <qed777@gmail.com>, git@vger.kernel.org
Subject: Re: Dumb "continuous" commit dumb question
Date: Tue, 19 Aug 2008 07:48:53 -0700 [thread overview]
Message-ID: <20080819144853.GD20947@spearce.org> (raw)
In-Reply-To: <e1dab3980808190732i303f06ach50e36e13a624bd23@mail.gmail.com>
David Tweed <david.tweed@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.
Have the script use "export GIT_INDEX_FILE=.git/temp-branch-index"
so that it stages changes into an index which isn't the main one,
and thus has no impact on the main branch. Thus you can still
commit a subset of the temp branch at any time.
Actually you can do something like this:
export GIT_INDEX_FILE=.git/temp-branch-index &&
cp .git/index $GIT_INDEX_FILE &&
git add . &&
git add -u &&
git update-ref refs/heads/temp $(date | git commit-tree $(git write-tree) -p temp)
;-)
--
Shawn.
next prev parent reply other threads:[~2008-08-19 14:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 3:47 Dumb "continuous" commit dumb question Pat LeSmithe
2008-08-19 4:13 ` Marcus Griep
2008-08-19 14:32 ` David Tweed
2008-08-19 14:48 ` Shawn O. Pearce [this message]
2008-08-19 17:55 ` Jeff King
2008-08-19 14:54 ` Avery Pennarun
2008-08-19 15:02 ` David Tweed
2008-08-19 15:08 ` Avery Pennarun
2008-08-19 15:21 ` 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=20080819144853.GD20947@spearce.org \
--to=spearce@spearce.org \
--cc=david.tweed@gmail.com \
--cc=git@vger.kernel.org \
--cc=qed777@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