2

Across multiple repositories, with no fancy sub repos or anything, when I make a new file Git does not see it.

I can use git status and it shows nothing. I can use git add . and no files are staged. I have to manually add each and every file I create with git add /path/to/file.extension, but that works at least.

Yes, I know what you're thinking. No I don't have anything in my .gitignore files that would be causing this.

I upgraded to Git version 2.16.1, and no dice. Same as before. Thanks for any advice!

jpadvo
  • 6,031
  • 3
  • 26
  • 30
  • Git 2.16 has some (ongoing work) support for file system monitors to speed up the index-as-cache. I wonder if there's something botched there, so that it thinks that there's nothing to add because it has not seen a file system monitor event. – torek Feb 13 '18 at 23:52

2 Answers2

1

No I don't have anything in my .gitignore files that would be causing this.

Still: double-check that with

git check-ignore -v -- path/to/invisible/file

You will be sure that way if it is a .gitignore (or exclude or other global ignore file) issue.

I can add the file without --force

Then check if the file was not ignored with a update-index:

git update-index --no-assume-unchanged -- a file
git update-index --no-skip-worktree -- a file

Check also or any .gitattributes file and their directives included in them.

Jazimov
  • 12,626
  • 9
  • 52
  • 59
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

What happens when you add a file and then run git status? I suspect that the git command you're running is operating from another folder and that's why it works when you use an explicit path. I'm on a Windows platform so I can't give OS-specific advice about Sierra but perhaps my suggestion might help... From where exactly are you running your git command--can you run your git command from the root path that contains your repo's hidden .git folder?

Jazimov
  • 12,626
  • 9
  • 52
  • 59
  • Can you also run 'git version' and let us know what you see (I want to be sure you're running what you think you're running)? – Jazimov Feb 13 '18 at 06:08