Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
How to include gitignore filter functionality for a folder upload?

I want to build a feature into my React application where I automatically exclude/filter out code files that would be excluded by the .gitignore file patterns on file upload.

However, it doesn't make any sense cause apparently git uses fnmatch(3)/glob but when I use different libraries that claim to apply to these filters it doesn't work properly e.g. minimatch (JavaScript), picomatch (JavaScript) and fnmatch (Python). For example, in .gitignore file you exclude directory via the following "[Bb]in/" however that doesn't match on anything. Are git just manually adding the asterisks like so "/[Bb]in/"? Also for files in .gitignore filters it out if you have "/access.log" and then access.log will be a match, but there is no match in these libraries.

Any help would be greatly appreciated!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda