Added Rider cache directory and Mac .DS_Store files. #3366
Conversation
|
.idea is not a cache folder. It contains settings that may be shared with the team. Some files in there therefore need to be added to source control. |
|
I had a chat with Rider developers on this topic last week. Basically, the only things this folder contains you'd like to commit to git are:
(1) is not used with Unity, (2) is rarely used. I ran a poll in twitter on this topic https://twitter.com/valyard/status/1253373196042211328 Most of the Unity devs add the whole folder to .gitignore with every project. I am pretty sure the majority of the others just don't know what the .idea folder is about and commit it just in case. I'd like to discuss this of course, but I am certain that if the vast majority of people can benefit from adding .idea folder to the default .gitignore — we should do it. |
|
We share the following settings from the .idea folder in many projects company wide
All of the above can only be stored inside the .idea folder. Adding this folder to .gitignore will brake us and works against the the design of that folder. Rider will automatically add and update a separate .gitignore inside the .idea folder for all the stuff inside the .idea folder that should never be added to VCS. You can also add things there manually. Rider also has a UI to add thing to .gitignore: So generally speaking, adding something to .gitignore manually in a specific project is much easier than removing something from .gitignore that you don’t want. In my opinion, only those things should be added to the common .gitignore baseline file that 100% of the user never ever want to have in VCS. |
|
I oppose adding the Disclaimer, I'm a developer advocate at JetBrains, and work on the Unity plugin. It might even have been me that gave the advice that it's fine to do so, but this wasn't intended as advice for all Unity developers, more like confirmation that it won't break anything mission critical if you choose to do so. It is safe to ignore the As @bitbonk points out, there are lots of benefits to having properly shared settings, and for those that set it up, making this the default will break their workflow for new projects. The official advice is this: let Rider handle it. Rider will create a Secondary advice is this: if you don't want to let Rider handle this, use the JetBrains.gitignore file, and add it to your It is very unfortunate that the In the meantime, the recommended advice is either let Rider handle it for you, or include the correct patterns from |
|
I don't know if @bitbonk does any development in Unity, because it is not correct to comment on the issue from a purely C# point of view. It is clear that there might be use cases when the |
Ignoring JetBrains Rider specific files. These are per developer per platform, as well as not all developers use Rider for Unity C# code.
Ignoring folder specific attributes stored in .DS_Store on OSX.