git - How do I use an optional extension in a .gitignore file? -
i have following 2 files
./file ./file.text ./file.yo
now want exclude of these git , not sure how. thinking regex **/file(?:\..*)
, cannot translate gitignore. see there optional char based on documentation appears !
. documentation not provide examples , not sure correct.
how write .gitignore
line excluding these files @ once?
to match 3 files 1 line, use file*
, matches files beginning 'file'.
if files in specific directory, can use <directory>/file*
reduce match scope.
Comments
Post a Comment