github设置只识别指定类型的文件

原文

# 忽略所有文件
*
# 不忽略目录
!*/
# 不忽略文件.gitignore和*.foo
!.gitignore
!*.foo
原文地址:https://www.cnblogs.com/zhuangliu/p/6048444.html