I use a multi-module maven project. And for me it is a common practice to click with the right button of the mouse on root module and simply select Git -> Commit Directory... option.
In that scenario, I'm always seeing these target folders and I have to always uncheck them.
Is there a configuration to hide these target folders when using commit
command? I'm also using .gitignore but it doesn't seem to be working.
Thanks for any help!
To prevent files from committing, you should add them to .gitingore. Gitingore, however, affects only unversioned files.
According to the screenshot, files from the target
folders are already tracked by git, thus adding to .gitingore does not affect them. You need to stop tracking them in git first - this can be done with git rm --cached
command.