What part of ignore does git not understand about gitignore?

I am starting a new project and would like to have version control from the start. I experimented over the weekend with a new yii2 project created on my live server and pushed to a repository. I initialized git and attempted to add files for the first commit and got this message:

The following paths are ignored by one of your .gitignore files:

vendor

Use -f if you really want to add them.

fatal: no files added

Am I missing something about the add command? I assumed that add * would be everything except what is in .gitignore. I did the dreaded “got it working” thing by doing the -f, but I really didn’t want to add the vendor folder. Why can’t git ignore what is in gitignore and add the rest?

I am searching all over for answers. The only thing I can find is to have /vendor in the .gitignore which it already is. No one has ever had this problem?

I can’t see the problem :)

Git says that it hasn’t got anything to add, so unless you really want to use ‘f’, don’t.

If I am doing an init on an already existing project, I always add the gitignore(s) first. But I suspect that Git is intelligent enough to handle it all in one go.

The problem is that no files are ever added.