我的.gitignore文件被忽略,应该忽略的文件仍然可见。
user@host ~/workdir % git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: .htaccess
# modified: application/controllers/statistics.php
#
no changes added to commit (use "git add" and/or "git commit -a")
user@host ~/workdir % cat .gitignore
.htaccess
application/config/config.php
application/config/database.php
user@host ~/workdir %
这些文件在版本控制中,但有一些我不想推送的合理更改。git rm ...不是一个选项,因为文件应该在版本控制中(文件中有其他设置)。我只是不想在这些文件上推送我的更改。