Ignore Files In Gitignore Using Globbing Patterns

1. globbing patterns

  • powershell has globbing patterns implemented as well without any addition; DOS has some differences (see the wikipedia page)

2. special characters

  1. * for any char
  2. ? for single char
  3. []for range
  4. ! for negation
  5. \ for escape
  6. / for directory
  7. # for comment

3. my scenario

  • in one particular example, I need to filter all docs that contain either -prod1 string or alert string
  • also nothing in /docs folder

4. sources



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pavol Kutaj

Pavol Kutaj

Infrastructure Support Engineer/Technical Writer (Snowplow Analytics) with a passion for Python/writing documentation. More about me: https://pavol.kutaj.com