Git doesn't ignore file

Question:

I'm trying to ignore a file with github but for some reason it doesn't ignore it, for this I have the following gitignore file:

*.p12

what I want is to ignore the "signature.p12" file, it is located in the following directory:

-Raiz
 -static
  -SRI
    -firma.p12(este deseo ignorar)

the file must be in that path, but I don't know how to ignore it, I appreciate any help..!!

Answer:

To solve the problem, you can make use of wildcards as discussed in the Git Ignoring files section.

Your line could look like this:

static/**/*.p12

What the above line tells you is to ignore all files with a p12 extension that are in the static directory or any of its subdirectories.

I hope that solves the problem with that.

Scroll to Top