Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?


The concern is documenting how to ignore files in a git project with a .gitignore file using so called globbing pattens (aka standard wildcards).



1. globbing patterns

Sixth Edition Unix, also called Version 6 Unix or just V6, was the first version of the Unix operating system to see wide release outside Bell Labs. It was released in May 1975 and, like its direct predecessor, targeted the DEC PDP-11 family of minicomputers. It was superseded by Version 7 Unix in 1978/1979, although V6 systems remained in regular operation until at least 1985.

— from Version 6 Unix - Wikipedia

  • 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 in a single segment (folder)
  2. ? for single char
  3. []for range
  4. ! for negation
  5. \ for escape
  6. / for directory
  7. # for comment
  8. ** for any char in multiple segment/folder

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment