6

I started a new project with my team. We are using Intellij + Java + git for developing the software.

The problem I have is that I made a .gitignore file for git auto-generated by gitignore.io. The file ignores the workspace.xml and the Project.iml files in my Project, which is good, because they cause merging conflicts later.

The thing is when I push the project on bitbucket.org and my collegues want to clone it so they can work on it, they have no workspace.xml. So Intellij can't open it up as a project.

Is there any way they can generate the missing Files or any Import option to make it a project again?

1 Answer 1

5

workspace.xml is not required for opening an IntelliJ IDEA project. On the other hand, the .iml file is a required part of the project and needs to be shared in the version control system if you want to share your project with colleagues.

Sign up to request clarification or add additional context in comments.

5 Comments

Ok, so i just need to add the .iml file in to the VCS to make it a Intellij Project?
You need to add the .iml file and the contents of the .idea directory excluding workspace.xml and tasks.xml.
@yole I think the annoyance here if you don't version workspace.xml is that you lose Run Configurations. If your project has a lot of separate modules that execute independently or you have various different test configurations, along with any JVM parameters or whatever they contain, all that stuff stays local. Kind of annoying if you also use Git to sync multiple environments. I wish they'd pull that stuff out of that file. Or maybe I should say "y'all" since I see your profile "IDEA Product Manager". :)
@Manius, when you make a new Run Configuration, there's a checkbox in the upper right corner that let's you store the configuration as a Project File (says something like that). If you do that it will be stored outside of workspace.xml and shared with other people in the project via git.
Oh yeah I think I forgot about that option, I'll have to give that a try.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.