Pattern matching doesn’t just work before the extension. Just as much as you can ignore *.txt
, you can ignore:
output*.txt
Just add the following to your gitignore:
output*.txt
*
is a "wildcard", so it will match anything.
Using * just as in regex matching (or wildcard matching) will do the job. Just provide the entry
output*.txtinto your .gitignore file, and the problem is solved!
if you want to ignore files with starting letters, also you can do with extensions as well
for all extensions
startingFileName*.*
mp
letters like mp3,mp4 etc
starting*.mp*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With