无论大小写如何忽略git中的文件扩展名? [英] How do I ignore file extensions in git regardless of case?

查看:201
本文介绍了无论大小写如何忽略git中的文件扩展名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想告诉git忽略例如jpg文件,不管扩展名是如何写入的。

例如


*。 jpg


应该忽略


.jpg ,.JPG。,.Jpg

等。



没有告诉git忽略大小写?

解决方案

Git忽略了解glob模式,因此您可以使用这个

  *。[jJ] [pP] [gG] 


I want to tell git to ignore e.g. jpg files regardless of how the extension is written.

e.g.

*.jpg

should ignore

.jpg, .JPG., .Jpg

etc.

Is that possible without telling git to ignore case altogether?

解决方案

Git ignore understands glob pattern, so you can use this

*.[jJ][pP][gG]

这篇关于无论大小写如何忽略git中的文件扩展名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆