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

Can't track untracked file

From
MHMarco S Hyman <marc@snafu.org>
Date
Aug 15, 2012, 23:58 UTC
Message-ID
<A32BFCAF-114F-4A65-B802-8DD2A795B96E@snafu.org>

Don't know if this is a git bug or something I'm doing wrong. Suggestions appreciated.

On a machine named server:
  server[saturday]$ uname -a
  OpenBSD server.snafu.org 5.1 SERVER#342 amd64
  server[saturday]$ git --version
  git version 1.7.6
  server[saturday]$ git status
  # On branch master
  nothing to commit (working directory clean)

Yeah, I haven't updated that machine in a while. Ignore that as everything is fine on that machine. The issue is on another machine:

  $ uname -a
  Darwin dumbcat.snafu.org 12.0.0 Darwin Kernel Version 12.0.0: Sun Jun 24 23:00:16 PDT 2012; root:xnu-2050.7.9~1/RELEASE_X86_64 x86_64
  $ git --version
  git version 1.7.11.3
  $ git clone server:~www/www/saturday
  Cloning into 'saturday'...
  remote: Counting objects: 11401, done.
  remote: Compressing objects: 100% (6868/6868), done.
  remote: Total 11401 (delta 5620), reused 9456 (delta 4523)
  Receiving objects: 100% (11401/11401), 658.01 MiB | 10.79 MiB/s, done.
  Resolving deltas: 100% (5620/5620), done.
  Checking out files: 100% (4454/4454), done.
Everything should be fine, right.  Except...
  $ cd saturday/
  $ git status
  # On branch master
  # Untracked files:
  #   (use "git add <file>..." to include in what will be committed)
  #
  #	2010/
  nothing added to commit but untracked files present (use "git add" to track)
And there is NOTHING I can do to get that directory into git.
  $ git add 2010
  $ git commit -m 'will it work?'
  # On branch master
  # Untracked files:
  #   (use "git add <file>..." to include in what will be committed)
  #
  #	2010/
  nothing added to commit but untracked files present (use "git add" to track)

The directory is not empty. Everything was fine prior to the last commit (into a different directory). I'd originally done the changes and commit on this machine. When things went to hell I repeated the changes on the machine "server" and cloned it as an attempted work-around to the issue.

What next?
Next: Junio C Hamano
Message 1 of 2 in “Can't track untracked file”
  1. Marco S HymanAug 15, 2012
  2. Junio C HamanoAug 16, 2012

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.