How not to ignore directories with the same name?

6

I have the following structure:

nbproject
public_html
   build
      index.min.html
      style.min.css
   index.html
   style.html
build
dist

My .gitignore to ignore the Netbeans configuration files looks like this:

nbproject/
nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml

The problem is that it is ignoring all directories with build , including what is inside the "public_html" folder that should not be ignored.

How do I stop ignoring this directory?

    
asked by anonymous 21.12.2014 / 14:05

1 answer

6

Use absolute path :

/build/

You can also use ! or !* to clear the previous defaults but I do not recommend this solution.

Documentation .

    
21.12.2014 / 14:16