Re: An alternate model for preparing partial commits
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Jun 27, 2008, 08:35 UTC
- Message-ID
- <4864A652.6070607@viscovery.net>
- In-Reply-To
- <9af502e50806262350t6e794a92g7751147f1882965@mail.gmail.com>
Robert Anderson schrieb:
Show 7 quoted lines
> 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