比如,我git提交,想要忽略webapp下面的所有文件: 正确写法: webapp/ 注意: 这样写就好,不用关注它前面路径如何,只要符合这个文件名就好 错误写法: webapp/*,*/webapp/*