IntelliJ IDEA 2019.2 will add native support for Git ignore to the platform, which means that the upcoming IntelliJ IDEA 2019.2 and all v2019.2 IntelliJ-based IDEs will have Git, Mercurial, Subversion, and Perforce native ignore file handling out of the box.
With this post, we will summarize all the features that IntelliJ IDEA and IntelliJ-based IDEs will have to offer, and hopefully answer any questions you may have.
Support for VCS ignores in IntelliJ-based IDEs
With v2019.2, we have switched entirely to native handling of ignored files and removed the built-in mechanism in the IntelliJ Platform for ignoring files. So, there is no more fiddling around with the Ignored Files table in the Preferences/Settings | Appearance & Behavior | Version Control.
Now the process of handling the VCS (Git, Mercurial, Subversion) ignored files is straightforward – simply add a file to the ignored file from either the Project Tree or the local changes tab of the VCS tool window.
Just a quick heads up… The list of Ignored Files that have been added via IntelliJ’s obsolete mechanism will not be automatically migrated to the .gitignore file, you’ll need to add the necessary files manually.
IntelliJ IDEA 2019.2 and the IntelliJ-based IDEs correctly show the file status by highlighting the ignored files in the project tree; such files are marked with an olive color. Code completion also now works in .gitignore files.
When you create a new project in IntelliJ IDEA or any other IntelliJ-based IDEs now, the IDE creates a .gitignore file in the .idea directory which lists all the files that are not intended for sharing.
For many years, the .ignore plugin provided the Git ignore and HG ignore support for IntelliJ-based IDEs. So when we decided to implement this functionality as a part of the IntelliJ Platform, we began working closely with Jakub Chrzanowski, the author of the .ignore plugin.
We very much appreciate the work that Jakub Chrzanowski has been doing for so many years, and we want to say a big thank you to him!
We have agreed with Jakub that from now on, the .ignore plugin will be maintained by JetBrains. To learn more about our collaboration, please read the interview with Jakub.
What does this mean for you? For sure, the .ignore plugin will still be available from our repository, but depending on the version that you use, this plugin will provide different functionality. For IntelliJ-based IDEs v2019.1 or lower, it will provide full support for VCS ignores. For the upcoming v2019.2 and all subsequent versions, it will provide only advanced functionality of VCS ignores, such as .dockerignore, .npmignore, .prettierignore, etc, as the main functionality will be part of the platform itself.
Download and try out the upcoming IntelliJ IDEA 2019.2!
Let us know us what you think – here in the comments, in our issue tracker, or on Twitter.