> From: Pierre-François CLEMENT <lik...@gmail.com>
> Really? Sounds a bit strange. I feel like "tracked files" are committed
> files, and that staged files are "about-to-be-tracked files" so in a sort
> of a transient state.

Yeah, but what one *feels* is the definition of the word is not
relevant.  To work consistently, Git has to have a definition of
"tracked" and stick with it.  (Though one can reasonably argue that
Git would work better with a different definition, one has to think
long and hard about changing such a central design decision.)

> So I'm not sure what to think here. I've searched through the git-glossary,
> git-add, git-update-index, git-status etc man pages and couldn't find any
> hints on wether staged files are tracked files or not. Can anyone shed some
> light on this?

Unfortunately, you're running into the problem that Git isn't at all
well documented.  I can't find the source right now, but I'm certain
that the definition I quoted was from the O'Reilly book.  But I have
no idea where that author got it from; perhaps he found it by

The online book is particularly treacherous:

    Remember that each file in your working directory can be in one of
    two states: tracked or untracked. Tracked files are files that
    were in the last snapshot; they can be unmodified, modified, or
    staged. Untracked files are everything else — any files in your
    working directory that were not in your last snapshot and are not
    in your staging area.

If you read carefully, you'll note that it is self-contradictory:  His
definition of tracked excludes staged-but-not-in-the-head-commit files
but his definition of untracked also excludes those files.

> 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).


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