gpt4 book ai didi

git - 将 git 设置为仅忽略根文件夹中的 index.php 而不是子文件夹中的所有 index.php 文件

转载 作者:太空狗 更新时间:2023-10-29 13:06:46 24 4
gpt4 key购买 nike

我有 .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/

24 4 0
文章推荐: javascript - 复选框中的 onchange/onclick 在 IE 中不起作用
文章推荐: html-entities - XHTML5 和 HTML4 字符实体
文章推荐: javascript - 在 上显示
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com