git只追踪特定类型的文件

比如我只关心所有office文档并排除掉~开头的辅助文件:

*
!*/
!*.docx
!*.doc
!*.xlsx
~*
原文地址:https://www.cnblogs.com/xiangnan/p/9563742.html