首页 > .gitignore 例外下的文件夹不检测新增文件

.gitignore 例外下的文件夹不检测新增文件

*
!about/*
!.gitignore
!extend/*
!extend/core/2029321.php
!extend-library/*
!imaegs/*

*忽略库中的所有文件
之后下面开始添加例外
现在问题来了
1、已经提交过的文件 删除 和 更变都会被检测
2、新建立的文件 例如extend/core/2029321.php 就不会被检测。

求解、


转自 Stack Overflow

  1. 首先, 提交全部更新
  2. 执行 git rm -r --cached . 从 index 内删除所有变更过的文件
  3. 执行 git add .git commit -m ".gitignore is now working"
【热门文章】
【热门文章】