0

At the root of the project is .gitignore and the vendor folder. The gitignore file contains:

!vendor/folder - except the folder in the vendor.

vendor/ - exclude the entire vendor,

Git does not track changes to files in the vendor except one - folder. Everything is as it should be.

Problem: Git does not see the new files when I create them, just noticed.

I'm using PhpStorm and it usually suggests adding a new file to the git, but not for new files in the folder, similarly the console does not see new files.

The question is solved directly by the gid add command with the -f option, and warns in advance that the file is in a folder that is excluded (!) By one of the ignore files.

How to fix the situation and what's the problem?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
rugleb
  • 1
  • 2

1 Answers1

0

I moved the exception below the vendor folder and changed the vendor -> vendor/*.

Now in .gitignore:

vendor/*

!vendor/lynx/
rugleb
  • 1
  • 2