Previously, the following was my .gitignore file:
... config/database.yml .DS_Store
Later I created an app_config.yml file in the config directory and committed it.
Now, I realized that I don’t need the app_config.yml file in the git repository. And I modified my .gitignore file:
... config/app_config.yml config/database.yml .DS_Store
Now, when I commit, that app_config.yml file is still in my repo. I want to remove that file from my repo. How can I do it?
As mentionned in ‘ignoring doesn’t remove a file ‘
(the following quote the great article from Nick Quaranto,
in his blog git ready ‘learn git one commit at a time’):