jpadvo
jpadvo

Reputation: 6635

Git doesn't see new files after upgrading to OS X High Sierra

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!

Upvotes: 2

Views: 78

Answers (2)

VonC
VonC

Reputation: 1324937

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.

Upvotes: 1

Jazimov
Jazimov

Reputation: 13292

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?

Upvotes: 0

Related Questions