From: Linus Torvalds Date: Tue, 14 Feb 2006 19:00:44 GMT Subject: Re: several quick questions Message-ID: In-Reply-To: <87irrhvkyl.wl%cworth@cworth.org> On Tue, 14 Feb 2006, Carl Worth wrote: > > Oh, I'm blind. I didn't see git-checkout-index, (thanks Kenneth for > mentioning it elsewhere in the thread). So now I've at least got the > recipe I was after: > > git-read-tree > git-update-index --replace > git-checkout-index -a -f -u This is very very inefficient, because it will replace the old index without using the (valid) information that is there from before. Resulting in a lot of unnecessary IO.. You may not care for a small project, but for bigger stuff, you're better off using more subtle approaches. Explore using "git-read-tree --reset " or, perhaps even more interesting is "git-read-tree -u -m " > And I think that would make for a dandy command to have in git. Any > suggestions for a name? I'd suggest "git reset" as a cool way to say that it "resets" the tree to another version ;) Linus