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

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -