Re: How do I clear the directory cache

From: Linus Torvalds <>
Date: 2005-10-22 07:00:00
On Fri, 21 Oct 2005, eschvoca wrote:
> >
> > 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).

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at
Received on Sat Oct 22 07:01:04 2005

This archive was generated by hypermail 2.1.8 : 2005-10-22 07:01:08 EST