I have this .gitignore file:
/node_modules
/public/storage
/public/hot
/storage/*.key
/vendor
.idea
Homestead.json
Homestead.yaml
.DS_Store
Thumbs.db
*.sublime-project
*.sublime-workspace
.project
/nbproject
_ide_helper.php
composer.phar
error.log
Todo.rtf
.vagrant
/.vagrant
npm-debug.log
.env
/public/css/backend.css
/public/css/frontend.css
/public/js/backend.js
/public/js/frontend.js
/public/mix-manifest.json
/public/mix.js
Right now I'm ignoring last lines (starting with /public/...
) but they are specific files. In my project I have a lot of compiled files like:
/public/css/backend.345346n345jkn3454.css
/public/css/frontend.679nkj67n9n79n679.css
/public/js/backend.2345b34j5bn345m34..js
/public/js/frontend.234234234n234f.js
/public/mix-manifest.json
/public/mix.9b87a1da741f957f3f09.js
Etc... so I want to include all the files that has the "backend", "frontend" and "mix" text in the beginning of the name. It is possible to do something like this?:
/public/css/backend*.css
/public/css/frontend*.css
/public/js/backend*.js
/public/js/frontend*.js
/public/mix*.js
I did that but it doesn't work, so I don't know how to do it.
EDIT: This question is not about ignoring already commited files on a repository. I wanted to know the use of wildcards for my specific situation.