On Wed, 2014-06-04 at 10:28 -0400, Dale R. Worley wrote:
> > From: Paul Smith <p...@mad-scientist.net>
> > 
> > A tracked file is a file that Git knows about.  An untracked file is a
> > file Git doesn't know about.  More concretely, any file that has ever
> > been "git add"'d is tracked.  Files that have never been "git add"'d are
> > not tracked.
> That's not true either.  If in one commit a file was added, and in the
> next commit, it was deleted, then *now* it is untracked (even though
> it was once added).

There are a million special case situations and it's too exhausting for
both the author and the reader to be sure to cover all of them every
time, which is why you perceive ambiguities in the documentation.

Also, this can be considered a matter of definition.  Another way to
look at it is that the file in that directory now has never been "git
add"'d because it's a different file, as the one before was deleted.  If
you delete a file "foo" from your directory then create a new file
"foo", is it the same file?  Or a different file?  If a cat named Felix
is sitting in a box then you take it out and put in another cat also
named Felix, is the cat in the box the same cat or a different cat?
What if the two cats are clones?

And, how can you use Git to answer these questions?


Anyway, the only trivially correct answer is that if you run "git
status" and it reports the file is untracked, then it's untracked.  If
it reports the file is in any other state, then it's tracked.

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/d/optout.

Reply via email to