我使用Git的项目,要排除从路径特定的子文件夹而不是该文件夹的兄弟姐妹例如:你如何在gitignore文件中做负向Lookahead/Lookbehind?
/Testpath/TestpathA
/Testpath/TestpathB
/Testpath/TestpathC
我想忽略TestpathA和C(以及任何其他路径可能是这些文件夹的兄弟姐妹,但不TestpathB
我试图
/Testpath/*
!/Testpath/TestpathB
,但没有奏效。
我一个LSO试图 /Testpath /(?!TestpathB)/ *
但也不能工作。
我改变了你的标签 - gitignores不使用正则表达式;他们使用特定的globbing风味。 – Cascabel 2011-01-27 06:05:14