I want to ignore all files matching this pattern.
home - copy [1].php
home - copy [2].php
home - copy [3].php
filename - copy [1].php
anotherfile - copy [1].php
other - copy [1].php
There can be numbers inside [ and ]. What rule should be added in .gitignore for such files?
EDIT: Apparently you can specify a number:
* - copy\ \[[0-9]*\].php
Unfortunately you can't use regex to specify a number in the [ ] but
* - copy\ \[*\].php
should work (although it would also filter test - copy [ab].php etc)
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