git .gitignore re-include

原有规则

[Ll]ogs/

现要保留 Views/Log 文件夹下的所有文件

!**/[Vv]iews/[Ll]ogs/

请注意:关键在于 **/

原文地址:https://www.cnblogs.com/bushuosx/p/11629186.html