我的.gitignore文件被忽略,應該忽略的文件仍然可見。.gitignore不會忽略文件
[email protected] ~/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")
[email protected] ~/workdir % cat .gitignore
.htaccess
application/config/config.php
application/config/database.php
[email protected] ~/workdir %
這些文件在版本控制中,但我不想推動明智的更改。 git rm ...不是一個選項,因爲這些文件應該在版本控制1(與文件中的其他設置)。我只是不想推動我對這些文件的更改。
刪除您回購的東西,也許這篇文章可以幫助你http://stackoverflow.com/questions/1139762/gitignore-file-not-ignoring試試吧! – 2013-05-10 04:59:19