How not to ignore directories with the same name?

Asked

Viewed 95 times

8

I have the following structure:

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

Man .gitignore to ignore the Netbeans configuration files is like this:

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

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

How do I stop ignoring this directory?

1 answer

8


Use the path absolute:

/build/

It is also possible to use ! or !* to clear the previous patterns but do not recommend this solution.

Documentation.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.