Search code examples
gitgithubintellij-ideaphpstormjetbrains-ide

How to store PhpStorm/WebStorm IDE project settings on GitHub?


JetBrains help says:

All the settings files in the .idea directory should be put under version control except the workspace.xml, which stores your local preferences. The workspace.xml file should be marked as ignored by VCS.

But all large GitHub projects exclude .idea from version control in .gitignore. So what is the right way to store IDE project settings (directories, inspections) on GitHub? It would be nice to see an example of such repository.


Solution

  • https://github.com/github/gitignore is a collection of .gitignore templates, including template for JetBrains IDEs. Although this template is not written entirely according to the JetBrains' advice, you can base your work on it.

    Meanwhile, there have been a few open pull requests which attempted to fix the .idea directory issue (#1475, #1399 and #1509). You can take check them out as well.

    Update
    #1475 has been merged.