Re: [FAQ?] Rationale for git's way to manage the index
- From
David Kågedal <davidk@lysator.liu.se>
- Date
- May 15, 2007, 01:00 UTC
- Message-ID
- <87sl9ygau1.fsf@morpheus.local>
- In-Reply-To
- <Pine.LNX.4.64.0705081256410.4167@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 18 quoted lines
> Hi, > > On Tue, 8 May 2007, Martin Langhoff wrote: > >> Heh. Making the index very visible makes sense when you are merging, > > You're saying that the main use of the index is to help merging. I have to > disagree strongly. > > When I have been chasing a bug all over the place, and finally found it, > my working tree is a mess. Lots of assertions, lots of debugging > statements, some of them commented out. So, now it is cleanup time, right? > > The problem is that more often than not, I broke my fix while cleaning up. > > Therefore, I now put all changed files into the index (git add -u), and > clean up the files one by one, always checking with "git diff" and "git > diff HEAD" what I still have to do.
Why not simply use a temporary branch for this? They're free, and you can diff just as easily, if not more. And you don't risk losing it if you slip with a command.
-- David Kågedal