Thread (9 messages) flat view 9 messages, 4 authors, 2016-06-15

Re: A Basic Git Question About File Tracking

From: Scott Chacon <hidden>
Date: 2016-06-15 22:52:13

Jon,

2011/10/8 Jakub Narebski [off-list ref]:
quoted
This spoils my understanding of what the index
is. I had been thinking that after you add files
to the index, and then commit, the index is then
empty. In other words, whatever's in the index
gets committed, and then the index is cleaned.

On the other hand, if the definition of a tracked
file is a file that's in the index, then this definitely
clears up my understanding of tracked files.

If every file that's 'git add'ed stays in the
index, how does git know which files to commit?
It may help to read a blog post I put on the Pro Git blog called
"Reset Demystified" that talks about a simplified model of the HEAD,
index and working directory.

http://progit.org/2011/07/11/reset.html

Let me know if that helps.  And you're right, the book should say "not
in the index" rather than "not be in the last commit", that would be
more technically correct. I think at that point in the book I have not
gone into any details about the index yet, so it would be confusing
without more detail.

thanks,
Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help