I have a project with multiple repositories set up (for different modules) - don't know if this is relevant, but I don't get the context menu option "Add to .gitignore" for any of my files within the PSI tree. Using newest plugin and IDEA release build. Tried disabling all other plugins, still happening.
@pwilkin Do you have any of *ignore file in your project ? Can you provide me more details about your case ?
Yes, I have quite a few of them. At least one per VCS root. What would you like to know?
(I can provide you with any debugging info you want if you need it)
I'll try to give as much relevant info that I can think of:
- The .gitignore file itself is ignored
Will it work properly if you remove this rule ?
@pwilkin Can you verify it with the latest v1.3.3 version ?
Yes, it still persists (the context option is still missing).
I might try to debug it if I get some free time.
Also, if it is of any help: the relative paths are recognized properly in the .gitignore file (marked as green). the absolute paths are not (marked as gray). So for example, if I have a .gitignore file in the root of my module VCS, then a "bin" entry is recognized properly, but a "/logs/" one is not.
I am using v1.4.1 with the latest IntelliJ IDEA, and I do not have this option as well.
Can confirm the issue aswell, context menu entry is missing.
This is also an issue in Rider.
Can I ask you to check if this issue is still present in v2.1.1?
This is an issue if you add a maven module to an existing one.
For example, if you 'open' a maven project it is added to the project view. If you then through the maven projects view add another project (via the green plus icon), the context menu doesn't appear for any files in the newly added project, but it does for the original.
In my experience the 'hide ignored files' doesn't work on these added projects either.
To recreate:
The above was confirmed using latest IntelliJ (2017.2.3 build #IC-172.3968.16) and latest .gitignore plugin (v2.1.1) versions
I can confirm the bug description by @themoffster with the latest IntelliJ (2018.1 build #IU-181.4203.550) and latest .gitignore plugin (v2.5.0) still.
This is happening to me as well now (Idea v2019.1.1 and .ignore v3.1.2.191). Tried deleting local caches and rebuilding project directories as well as having tried cloning to a new directory directly from GitHub. Cannot add files to .gitignore from the context menu and plugin also doesn't recognize files I manually add to .gitignore when trying to hide them from the project file tree tool window.
Also I encounter this problem, after reinstalling my laptop with everything freshly installed.
I only have the 'unignore' option, but none of my files can be added to the .ignore file:

Strange thing is that before I re-installed everything, adding did work correctly!
Here some extra info.
Plugin version:

PhpStorm version:

I just found out that the context menu does work in the case of

Can this function add to gitignore also be used in the 'project' tab in PhpStorm?
@ametad since 2019.2 the Add to gitingore is the platform functionality, which does not require the .ignore plugin. See #587 (comment)
It is git-related, so it is under GIt menu in the project tab.

The unignore action comes from the plugin though, so it is in a different place. I think we will move it to the Git submenu also.
@dmitriysmirnovjb Thank you for the info. I found it!
BTW only "Unversioned Files" have the option Git > Add to .gitignore > ... Is this indeed how it suppose to be? I guess to ignore already tracked files, the should first be removed from the repo and than added to the .gitignore file. Right?
Most helpful comment
This is an issue if you add a maven module to an existing one.
For example, if you 'open' a maven project it is added to the project view. If you then through the maven projects view add another project (via the green plus icon), the context menu doesn't appear for any files in the newly added project, but it does for the original.
In my experience the 'hide ignored files' doesn't work on these added projects either.
To recreate:
The above was confirmed using latest IntelliJ (2017.2.3 build #IC-172.3968.16) and latest .gitignore plugin (v2.1.1) versions