Re: How do I clear the directory cache
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Oct 21, 2005, 21:00 UTC
- Message-ID
- <Pine.LNX.4.64.0510211354440.10477@g5.osdl.org>
- In-Reply-To
- <2b05065b0510211316j632c461apbb6f2f162e5fc7ef@mail.gmail.com>
On Fri, 21 Oct 2005, eschvoca wrote:
Show 8 quoted lines
> > > > If that is what you want, then: > > > > $ git-read-tree HEAD > > $ git-update-index --refresh >/dev/null > > > Yes, this does exaclty what I want. Thankyou.
Btw, if this ends up being something you do often (or more than once), it's best to use the "--reset" flag to git-read-tree.
That will cause git-read-tree to still try to use any old usable entries in the old index, which most of the time means that 99% of the index will be up-to-date, and that in turn makes the index refresh _much_ faster.
For small projects it doesn't matter, of course.
In fact, those two lines can also be written simply as
git reset
which will do this, and more (in particular, it will also remove any sign of a partial merge-head).
Linus