Can I gitignore files with a prefix?

本小妞迷上赌 提交于 2019-11-30 03:55:42

问题


I have file a.css and b.css in the same folder. My framework combines those files in a file called temp.a12cab4598347b07f0079d.css This file will be generated wherever there is a css file, so folder matching is no good. Can I ignore all these files using something like

temp.*.css

Thank you


回答1:


It will work as expected.

Also, if you need to do this recursively in any subdirectory

**/temp.*.css



回答2:


Yes, that works just fine. The wildcard character in the middle of your string works well.

A great reference for gitignore patterns, matching, and rules is the official documentation on gitignore.



来源:https://stackoverflow.com/questions/32054684/can-i-gitignore-files-with-a-prefix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!