# Can't track untracked file

2 messages from 2012-08-15 to 2012-08-16. Participants: Marco S Hyman, Junio C Hamano.
Thread: https://gitlist.dev/t/31258

## Marco S Hyman, 2012-08-15 23:58

Subject: Can't track untracked file
Message-ID: <A32BFCAF-114F-4A65-B802-8DD2A795B96E@snafu.org>
URL: https://gitlist.dev/e/A32BFCAF-114F-4A65-B802-8DD2A795B96E%40snafu.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?
```

## Junio C Hamano, 2012-08-16 02:04

Subject: Re: Can't track untracked file
Message-ID: <7vr4r7383v.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vr4r7383v.fsf%40alter.siamese.dyndns.org
In-Reply-To: <A32BFCAF-114F-4A65-B802-8DD2A795B96E@snafu.org>

```
Marco S Hyman <marc@snafu.org> writes:

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

Perhaps "2010" or everything in it is ignored in .gitignore in
higher directories?

```
