Jetbrains - Include ignored files when committing

I'm working on quite a large modular project in Webstorm. The js code is compiled with Babel to ./dist folder, so are the assets like html templates and other files.

I would like to EXCLUDE ./dist since when I do a global search of "Navigate to Symbol/Class/etc", I don't want results from ./dist to be shown, so I mark the ./dist folder as excluded.

BUT due to the workflow and the modularity (projects are modules loaded with jspm), I need to commit changed ./dist into VCS (Git). This is our workflow and I can't do anything about that.

The problem:

When I click "Commit changes" I don't see the newly changed files in ./dist when I exclude this folder. Clicking on "Refresh changes" doesn't help.

Can I solve this issue somehow?

UPD

The ./dist directory is NOT in .gitignore

Upvotes: 1

Views: 1360

Answers (1)

Altenrion
Altenrion

Reputation: 774

You shouldn't exclude this directory from vcs, if you want or need to have it under version control. But for setting the directory, where IDE shouldn't search, you should set up IDE.

You have to remove your directory from git ignore or what ever, and set up ContentRoot in your IDE. I'm using PhpStorm and IntelijIdea, but the settings are common for all JetBrains Products.

Here is the part of JetBrains instruction :

To have files or folders excluded by name
1. Do one of the following: – Open the Settings dialog box, and click Deployment, then click Options below the Deployment node . 
– Choose Tools | Deployment | Options on the main menu. 

2. In the Options dialog box that opens, specify the patterns that define the names of these files and folders in the Exclude items by name text box. Use semicolons as delimiters. Wildcards are welcome. 
The exclusion is applied recursively. This means that if a matching folder has subfolders, the contents of these subfolders are not deployed either. 

So , you can read this : exclude files and restore the settings, and after that, use the next link, to set up the root directory.

Here is the instruction from JetBrains : JetBrains-Content Root

Upvotes: 1

Related Questions