Fixing gitignore issue.

I faced this specific problem couple of times that in my project .gitignore file is not working,I mean not ignoring the files that I declared in the file.

After googling and browsing through the web the follwing solution worked very well for me.

git rm -r --cached .
git add .
git commit -a -m "your commit message"

Thats it, 1 st line removed already indexed files so you need to add those using “add” and need to commit the changes.

Advertisements