I am new at github and I am developing an app that has a config.php
file that you must enter the database credentials.
In my github repository the file
To stop tracking a file you need to remove it from the index. This can be achieved with this command:
git rm --cached <file>
Commit that change
git commit -am "Remove ignored config.php"
.gitignore is for ignoring untracked files, but you need to ignore changes in the tracked one. you could use git update-index --skip-worktree /path/to/config.php
See https://git-scm.com/docs/git-update-index#_skip_worktree_bit