From: "Dale R. Worley" <>
To: <>
Sent: Thursday, July 18, 2013 6:32 PM
Subject: Re: [git-users] where is stored the staging area(index) on our machines

From: John McKown <>

The staging area is also called the git index. This is probably better than
I am at explaining:

but basically the index is in the .git/index directory.

"The index is a binary file (generally kept in .git/index) containing
a sorted list of path names, each with permissions and the SHA1 of a
blob object; git ls-files can show you the contents of the index:"

That is, it's a list of all the files that are being tracked, and
their SHA1 hashes of the versions of their contents that are in the
index.  This implies that those contents are stashed in the object
store, despite that those contents may not yet have been committed.

This can lead to a situation where there is much disk consumed by
stashed-but-not-committed versions of files in the object store.  The
usual annoying case is when a huge file is added to the index and then
removed.  Only after Git garbage collection removes the copy from the
object store does the disk usage of .git go back to what it was

Sounds like the 'git gc' needs an option to deliberately prune specific files and/or large objects for such a case. Maybe something to discuss on the main Git list - no doubt some discussion as to what the command format would be and why it whould be relevenant and any regression issues.



You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to