*
!about/*
!.gitignore
!extend/*
!extend/core/2029321.php
!extend-library/*
!imaegs/*
*忽略库中的所有文件
之后下面开始添加例外
现在问题来了
1、已经提交过的文件 删除 和 更变都会被检测
2、新建立的文件 例如extend/core/2029321.php 就不会被检测。
求解、
转自 Stack Overflow
- 首先, 提交全部更新
- 执行
git rm -r --cached .
从 index 内删除所有变更过的文件 - 执行
git add .
和git commit -m ".gitignore is now working"