Vadorequest / JetBrains-Intellij-IDEA-.gitignore-best-practices

This repository provides a standardized .gitignore setup for managing .idea directory files in JetBrains IDEA projects
MIT License
0 stars 0 forks source link

What about Data Storage config? #1

Open bartekpacia opened 2 months ago

bartekpacia commented 2 months ago

I added a Postgres Data Source in my IntelliJ idea and now have the following files:

I don't think they should be gitignored as that would mean all team members have to recreate the db connection config every time, no?

DNA-PC commented 2 months ago

I agree. Those two should probably be whitelisted/allowed, indeed.

But, that really depends what kind of information is being stored there. If there are credentials stored in plain text, that could be a big no-go.

Here is what ChatGPT said about tracking those in git (for what it's worth):

the dataSources.xml file should not typically be tracked in Git because it contains environment-specific configuration, including potentially sensitive information like database connection strings or credentials.

Here are the main reasons why you shouldn't track it:

Sensitive Information: The file may include sensitive data, such as database credentials or connection details, which you don't want to expose in your repository.

Environment-Specific Configuration: Database configurations often vary between development, staging, and production environments. Tracking this file could lead to conflicts or misconfigurations when different team members push their environment-specific settings.

JetBrains Configuration Files Best Practice: Typically, the .idea directory, where dataSources.xml is stored, contains IDE-specific settings that shouldn't be shared between team members. The common practice is to ignore most files in the .idea folder, except for files like workspace.xml or codeStyleSettings.xml (if team members agree to share code styles)

IMHO, it depends on your team and needs. If those files don't contain sensitive credentials, tracking them might just be simpler.