我在.gitignore
文件中忽略的文件,对其做出的修改仍然会被Git跟踪。
文件结构:
.gitignore
wp-config.php
< p > .gitignore
的内容:wp-config.php
当我修改wp-config.php
文件后,运行git status
命令时,我会看到该文件已被修改:
alex$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: wp-config.php
#
如何停止跟踪这个文件?我以为把它放在 .gitignore
文件中就足够了。