gitignore Found ignored but not excluded directories
Answered
In the Commit tab I see things that are supposed to be ignored.
Why?
Please sign in to leave a comment.
> In the Commit tab I see things that are supposed to be ignored.
Probably because the files were already added to git, while gitignore only allows ignoring untracked files. In this case, you need to stop tracking files in git first, using git rm --cached command
But it is hard to tell exactly without details, at least a screenshot of what you see.
> Found ignored but not excluded directories
This message says that some directories that are added to gitingnore are not marked as excluded (are not excluded from indexing and search).
Okay, but git status doesn't show these files. Github Desktop doesn't show these files. Pretty much every single git application doesn't show these files. They are ignored. I use showdiff and it doesn't show any changes compared to previous versions so not sure what is going on here.
My .gitignore has text like this.
But security\php-malware-finder\php-malware-finder\samples\classic\ajaxshell.php still shows up.
It is grey though. I do not have "show ignored files" checked.
Thanks
It is hard to tell exactly without details, please share a screenshot of what you see in IDEA to start.
> It is grey though
Grey in the Local Changes stands for deleted by default. IDE checks the status in git, so probably there is another nested git repository somewhere inside security, and the file is deleted there.
What does git status show if called inside the security\php-malware-finder\php-malware-finder\samples\classic\ folder?
Same here. idea has blue .classpath and .prefs files showing in commit that are ignored by cli git status. My workaround is to move those to a separate changelist so I don't have to deal with them. I would prefer if idea would read the global or local .gitignore files and ignore them the same way that git ignores them.
> I would prefer if idea would read
IDEA relies on the command-line git, so all ignores git has are respected.
If refreshing the Local Changes list does not clear the modified files, then git status does report them when called by the IDE.
Again, the reason for them to show up might be some nested git repositories, in which the files are not ignored.
Check if changing mappings in Settings | Version Control to point to a specific repository makes a difference.