How to tell Git to ignore files that start with a specific word
October 17, 2021
If you want to tell Git to ignore files that start with a specific word you will need to add a `.gitignore` rule.
Let's say you want to ignore markdown files that start with a specific word like draft. Using the draft*.md
pattern to match against this situation will do the job, just add it into your .gitignore
file. As a side note, *
is a 'wildcard' so it will match any word or character.
draft\*.md