git - Ignoring files having different extensions with .gitignore -
i ignore files extensions *.mtx
or *.otc
in folder (data/
) , files extension *.pyc
in subfolders. .gitignore
should work?
/data/*.mtx /data/*.otc *.pyc
is there way make more compact? apparently doesn't work:
/data/(*.mtx|*.otc) *.pyc
i'd rather not use local gitignore unless strictly necessary, because seems me tidier have "ignore" instructions in 1 place, i'm open suggestions here
you can keep 1 .gitginore @ root folder of repo.
**/data/*.mtx **/data/*.otc *.pyc
that ignore mtx
or otc
files in data folders, if data not top-level folder (because not using anchor '/').
check if working with:
git check-ignore -v path/to/a/file
Comments
Post a Comment