我有 .gitignore 作为
index.php
protected/config/
我只想忽略根目录中的 index.php,但 git 也忽略了子文件夹中所有带有 index.php 的文件。 我如何修改 .gitignore 以仅忽略特定的 index.php 文件而不是所有名为 index.php 的文件
最佳答案
在你的 .gitignore
中使用 /index.php
关于git - 将 git 设置为仅忽略根文件夹中的 index.php 而不是子文件夹中的所有 index.php 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8438557/