.gitignore not being taken into account in 6.0

Hi,

using this gitignore file:

/web/bundles/
/app/bootstrap.php.cache
/app/cache/*
/app/logs/*
/build/
/vendor/
/bin/
/composer.phar
/.idea/
.idea/
.idea
app/cache/*


in the project root folder(standard symfony .gitignore with .idea added) does not work in 6.0, it still tries to add all of the "ignored" files and directories.

This works without issue in 5.x
8 comments

What about the command line Git: does it show these files as new/modified when you call `git status`?

0

This is happening to me too; from the command line, git is correctly ignoring my files. But PhpStorm 6 seems to be ignoring this.

0

Could you please specify in detail, what exactly is happening: how PhpStorm ignores it?

0

For example, I have "vendor" in my .gitignore. From the command line, this correctly tells Git to ignore anything in the vendor directory. But when I do an update using Composer and it adds new folders or files to the vendor directory, PhpStorm prompts and asks if I wish to add them to Git.

0

Exactly this.

For example, if you use a Symfony 2 console command that in any way generates cache files, even if you have the cache folder in your gitignore, phpstorm will still spam you with messages if you want to add the files to git.


Add files to Git.jpg

This is when using the cache:clear command with this .gitignore:
/web/bundles/
/app/bootstrap.php.cache
/app/cache/*
app/cache/* (debug)
/app/logs/*
/build/
/vendor/
/bin/
/composer.phar
/.idea/ (debug)
.idea/ (debug)
.idea

It also sometimes asks to add the .idea/workspace.xml file.

In any case, something is weird with the way phpstorm treats the .gitignore in the project root.

0

This looks like the same problem reported here: http://devnet.jetbrains.com/thread/444397.  Is the "parent" folder in question already in source control?  I've found that if it is, it will ignore the .gitignore and still process changes even though you've asked for it not to.  In other words, even if you have just an empty 'vendor' or 'app/cache' directory added to source control and then request gitignore on the directory, it's going to ignore that and still process changes.

0

The parent folder is not in source control in this case, thanks for the tip though!

0

Currently Command Line Tool plugin uses its own buggy add new files implementation.

0

Please sign in to leave a comment.