Re: [FAQ?] Rationale for git's way to manage the index
- From
Martin Langhoff <martin.langhoff@gmail.com>
- Date
- May 8, 2007, 03:16 UTC
- Message-ID
- <46a038f90705072016x17bd60c3ic779459438ffc19@mail.gmail.com>
- In-Reply-To
- <vpqbqgxak1i.fsf@bauges.imag.fr>
On 5/7/07, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
Show 12 quoted lines
> Linus Torvalds <torvalds@linux-foundation.org> writes: > > > On Sun, 6 May 2007, Matthieu Moy wrote: > >> > >> But the fact that git actually remembers the _content_ of files in the > >> index, and that the default behavior for "commit" is to commit only > >> the content that is explicitely "git add"ed is something I've never > >> seen outside git. > > > > Yeah. You'd better get used to it, because it's fundamental. > > Thanks a lot for the detailed explanations.
Heh. Making the index very visible makes sense when you are merging, Linus and Junio are both integrators and spend a lot of time merging. Hence the default is for git-commit to observe the index.
I agree with Linus' other points too, but at the end of the day, it makes life easier and saner mainly when merging, at the expense of having to pay a bit more attention in common commits. The tradeoff makes sense _specially_ if you are the integrator.
So I do git-commit -a, and typing that '-a' is small price to pay for the best SCM I've ever used ;-)
cheers,
martin