PhpStorm (and other IntelliJ IDEs) create a .idea project folder which stores settings in XML format. JetBrains recommends version-controlling these files so that they can be shared amongst the team.
My team tried this in the past but ran into trouble because we're constantly switching between branches which really messes with our settings/IDE.
Is there a way, in Mercurial, to version these files independently of our main project so that when we switch branches the .idea files are left as-is?
Yes, you can do so. Add the .idea directory to .hgignore, then create a separate Mercurial repository in the .idea directory. Under Settings | Version Control, make sure that you have both your project directory and the .idea directory as VCS roots, with Mercurial selected as the VCS.
Related
I have observed the following different files in my intellij java project -
.idea folder
.out folder
.iml file
.src folder
Out of these files I'm thinking of adding .idea folder, .out folder, .iml file to .gitignore? Am I right? Or do these folders and files hold some significance which needs tracked by git?
Please see how to handle files in .idea in terms of Git:
https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems
The .out folder can be added to .gitignore, since it is created once the project is built (when you press Run in IntelliJ).
The .iml file and the .idea folder stores information about your project. Do NOT add this to .gitignore, as it is needed when others clone your project and build it themselves.
Source/s:
https://stackoverflow.com/a/44362056/14368392
https://rider-support.jetbrains.com/hc/en-us/articles/207097529-What-is-the-idea-folder-
I want to be able to open a directory with intellij without creating a project.
how to do it?
every time I open a folder, a project is automatically created with an .idea folder
When you use the Intellij IDE to open a directory,
It assumes that you are going to open a project (as it is the main reason to use IDEs). By default all of jetbrains's IDEs put the project specific settings for project in the .idea folder.
It is also safe to delete it if you are just opened a directory. There would be no problem in deleting this.
You can also use Terminal tab to change or open a directory (Alt+F12)
and use terminal commands to traverse between directories without creating any .idea folder.
We have multiple developers working on a shared project through dropbox. Each time one of the developers saves a file, the other developers get the following message:
"Project Files Changed
Project components were changed externally and cannot be reloaded:
ToolWindowManager
Would you like to reload project?"
How can each person have their own settings in a shared project so this is not a problem?
You should use VCS (Version control systems) as for example git, and ignore the IDE configuration files (.gitignore), so you can avoid the conflicts with the configuration files
Is it possible to rename the .idea folder that's automatically created by IntelliJ or move it to a different location?
Renaming the .idea directory is not possible; IntelliJ IDEA always reads project files from the directory with that exact name, and it can't be changed.
Moving is sort of possible. The locations and content roots of modules in IntelliJ IDEA are completely independent from the location of the project itself. Because of that, you can create a project in a directory that doesn't contain any code, and set up modules with content roots pointing to the directories where the code is located.
I have IntelliJ IDEA 13.1 running on a number of machines, all with identical paths for the project and modules but different local user names. The .idea directory gets committed to the git repo. When I make changes to my Global Libraries those are not reflected on the other machines because that info is in
C:\Users\user\.IdeaIC13\config\options\applicationLibraries.xml
I want changes to Global Library settings to be required only once and applied everywhere.
Should I tell IDEA to look for applicationLibraries.xml under the .idea directory instead of in the local user's directory which is not under version control? how?
Solution was to go into Project Structure, right click on each Global Library and choose "Copy To Project Libraries..." then remove the original from Global Libraries. Then in each project remove the old global library and add the newly created project library. This way library data is stored in the .idea dir and not the user's dir.
The applicationLibraries.xml file, among others, are stored in a platform-dependent folder in the repo, for example in _linux or _windows. If this is your problem, read on.
For things like keymaps this is wanted because things work differently after all, but for libraries which either only contain jars, or contain binaries (dll/so) for all platforms, this is unwanted.
On the PC with the global libraries (assuming linux for now):
Copy the file from config/settingsRepository/repository/_linux to _windows,
Execute git add _windows/applicationLibraries.xml from the command line,
Restart IntelliJ,
Merge repo (not Overwrite remote)
This solved it for me, and now I have global libraries on all my computers, and not just my linux computers.