i've tried what was suggested by a previous Stackoverflow question about how to ignore files: Ignore files that have already been committed to a Git repository
what was suggested:
git rm -r --cached .
the command I'm using:
git rm -r --cached application/config/config.php
//i only want to ignore this one file
Unfortunately, when I do git add.
and then git commit
my config.php is deleted from the repository and not just ignored.
I have a .gitignore file in my root directory and it contains the following list item:
application/config/config.php
might someone be able to help me understand why this config.php file is being deleted and just not being ignored?
here's what my git status shows:
$ 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: .gitignore
# modified: application/config/config.php
#
no changes added to commit (use "git add" and/or "git commit -a")
thank you,
tim