Git: How do I ignore matching directories in a sub directory?

git, gitignore

Solution

Try adding these lines to your .gitignore file:

src/*/bin
src/*/obj

Problem

I have a project with the following structure: ``` /. /src /project1 /bin /obj /project2 /bin /obj /tools /tool1 /bin ``` What can I add to my .git/info/exclude to ignore all bin/obj directories under "src"? I don't want to explicitly specify each project name.

Original source

Related problems