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.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.