Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!