git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A Basic Git Question About File Tracking
@ 2011-10-04  0:53 Jon Forrest
  2011-10-04  1:10 ` Jonathan Nieder
  0 siblings, 1 reply; 9+ messages in thread
From: Jon Forrest @ 2011-10-04  0:53 UTC (permalink / raw)
  To: git

I've been reading the Pro Git book. I'm having trouble really
understanding the concept of file tracking. Here's where
my confusion starts.

The Pro Git book says "Untracked basically means that Git sees a
file you didn’t have in the previous snapshot (commit)".

Is this right? I can easily think of a counter example.
Let's say you put a new file in the working directory of a
Git repo. Then you "git add" it. At this point, the file hasn't
been in any commit. Yet, 'git status' doesn't show the file
as being untracked. Should that statement be "Untracked basically
means that Git sees a file you didn’t have in the previous
snapshot (commit) or a file that hasn't been staged."?

One additional confusing thing is that "git add" apparently
both starts tracking a file and puts it in the index the
first time a file is added. Thereafter, "git add" only puts
the file in the index. One of my research projects is to understand
what goes on internally when a file is tracked.

Jon Forrest

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-10-09 16:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-04  0:53 A Basic Git Question About File Tracking Jon Forrest
2011-10-04  1:10 ` Jonathan Nieder
2011-10-04  1:14   ` Jon Forrest
2011-10-04  1:22     ` Jonathan Nieder
2011-10-09  0:08       ` Jon Forrest
2011-10-09  1:17         ` Jakub Narebski
2011-10-09  2:42           ` A Basic Git Question About File Tracking [ANSWERED] Jon Forrest
2011-10-09  9:37             ` Jakub Narebski
2011-10-09 16:57           ` A Basic Git Question About File Tracking Scott Chacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).