[git-users] where is stored the staging area(index) on our machines

2013-07-18 Thread Chemsi Mehdi
Dear Git users,

I wonder where is stored that  staging area on our machines?
Is it in /tmp?

Many thanks in advance.
Mehditch




-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] where is stored the staging area(index) on our machines

2013-07-18 Thread John McKown
The staging area is also called the git index. This is probably better than
I am at explaining:
http://stackoverflow.com/questions/4084921/what-does-the-git-index-exactly-contain

but basically the index is in the .git/index directory. Normally this is in
the working directory of the project. But you can specify a different
location using various GIT_ prefixed environment variables.

On Thu, Jul 18, 2013 at 10:32 AM, Chemsi Mehdi chmsme...@gmail.com wrote:

 Dear Git users,

 I wonder where is stored that  staging area on our machines?
 Is it in /tmp?

 Many thanks in advance.
 Mehditch




  --
 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 to git-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
This is a test of the Emergency Broadcast System. If this had been an
actual emergency, do you really think we'd stick around to tell you?

Maranatha! 
John McKown

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] where is stored the staging area(index) on our machines

2013-07-18 Thread Konstantin Khomoutov
On Thu, 18 Jul 2013 10:44:05 -0500
John McKown john.archie.mck...@gmail.com wrote:

It should be noted that the index file has a complicated
not-human-readable binary format, and is not for direct intervention by
the user.  It should be treated as a completely opaque data and
manipulated by the Git tools exclusively.

 The staging area is also called the git index. This is probably
 better than I am at explaining:
 http://stackoverflow.com/questions/4084921/what-does-the-git-index-exactly-contain
 
 but basically the index is in the .git/index directory. Normally this
 is in the working directory of the project. But you can specify a
 different location using various GIT_ prefixed environment variables.
[...]
  I wonder where is stored that  staging area on our machines?
  Is it in /tmp?

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] where is stored the staging area(index) on our machines

2013-07-18 Thread Dale R. Worley
 From: John McKown john.archie.mck...@gmail.com
 
 The staging area is also called the git index. This is probably better than
 I am at explaining:
 http://stackoverflow.com/questions/4084921/what-does-the-git-index-exactly-contain
 
 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
before.

Dale

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] where is stored the staging area(index) on our machines

2013-07-18 Thread Dale R. Worley
 From: Philip Oakley philipoak...@iee.org

 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.

Well, you can get close to that by setting --prune=now.  Normally
git gc won't remove objects to which there are no pointers until 2
weeks after the object was created.  But --prune=now lets git gc
eliminate them immediately if they are dangling.

If the file gets recorded in a commit, but the commit is rolled back
(by resetting the branch tip to an earlier commit), then the reflog
for the branch may retain a pointer to the now-unused commit.  You can
get around that by setting gc.reflogExpire.

There's more information in the git gc manual page.

Dale

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.