A Basic Git Question About File Tracking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]