blue-sky blue-sky - 9 months ago 87
Git Question

Ignoring target dir in sub projects

I've project structure like so :


To ignore the target folder in each dir is this correct :

.gitignore contents :


Answer Source

/*/target will match the directory structure you specified.

If you want to ignore every target directory deeper in your directory structure you can use the line /**/target.

This will ignore: