git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: A Basic Git Question About File Tracking

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 4, 2011, 01:22 UTC
Message-ID
<20111004012244.GB13836@elie>
In-Reply-To
<4E8A5DF0.6040003@gmail.com>
Jon Forrest wrote:
> On 10/3/2011 6:10 PM, Jonathan Nieder wrote:
Show 13 quoted lines
>> "Untracked" means "not in
>> the index", nothing more, nothing less.
>
> But your definition doesn't include files that
> have been committed. In the following trivial case
> in a new git repository
>
> cp /etc/passwd x
> git add x
> git commit -m"fooling around"
>
> is "x" tracked? Your definition says it isn't
> but "git status" makes me think it is.

Yes, "x" is tracked. Moreover, "x" is in the index. You can list files in the index with the "git ls-files -s" command.

Does that help?
> Sorry to be so pedantic.

No problem --- it's good to clarify these things (especially if it results in finding documentation that should be clarified, too).

Jonathan
Previous: Jon ForrestNext: Jon Forrest
Message 4 of 9 in “A Basic Git Question About File Tracking”
  1. Jon ForrestOct 4, 2011
  2. Jonathan NiederOct 4, 2011
  3. Jon ForrestOct 4, 2011
  4. Jonathan NiederOct 4, 2011
  5. Jon ForrestOct 9, 2011
  6. Jakub NarebskiOct 9, 2011
  7. Jon ForrestOct 9, 2011
  8. Jakub NarebskiOct 9, 2011
  9. Scott ChaconOct 9, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.