My .gitignore has the following:
./config.json
But my config.json is still being committed when I make changes.
Why is this happening?
My .gitignore has the following:
./config.json
But my config.json is still being committed when I make changes.
Why is this happening?
If you file was added to repository before you added it to gitignore you should explicity remove it from repository
git rm config.json
git commit <message>
After removed from repository this file will be ignore as expected.
If you want to save this file in your file system you can remove with --cached option
git rm --cached config.json