Can I gitignore files with a prefix?

2019-02-14 01:59发布

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

2条回答
Juvenile、少年°
2楼-- · 2019-02-14 02:25

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.

查看更多
劫难
3楼-- · 2019-02-14 02:34

It will work as expected.

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

**/temp.*.css
查看更多
登录 后发表回答