Re: An alternate model for preparing partial commits
- From
- Robert Anderson <rwa000@gmail.com>
- Date
- Jun 27, 2008, 17:01 UTC
- Message-ID
- <9af502e50806271001j17a6ea8j4626d23e64a80c7f@mail.gmail.com>
- In-Reply-To
- <4864A652.6070607@viscovery.net>
On Fri, Jun 27, 2008 at 1:35 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 18 quoted lines
> Robert Anderson schrieb: >> Seems to me the concept of the "index" is a half-baked version of what >> I really want, which is the ability to factor a working tree's changes >> into its constituent parts in preparation for committing them. The >> index provides some very nice facilities to factor out changes in a >> working tree into a "staging area", but the fundamental flaw of this >> in my view is that this "staging area" is not instantiated as a tree, >> so it cannot be compiled and/or tested before committing. > > I do this all the time. After I have made $N commits out of my worktree, I > usually > > $ git rebase -i HEAD~$N > > and turn all 'pick's into 'edit's and 'squash's. Then I can compile and > test each commit, perhaps add some fixups, in isolation. > > -- Hannes
Hannes,
I do not have N commits. I have a modified working tree from which I would like to create N commits. I would like to compile and test an instantiation of each of those to-be-committed states before committing them.
Thanks, Bob