Git still adds and tracks folders marked in .gitignore [duplicate]

The reason it isn’t working is (probably) because you added some of those files before you added the .gitignore – so you have to remove them from git before they’re able to be ignored.

Source: https://stackoverflow.com/a/1139797/2128691

First, commit any outstanding code changes, and then, run this command:

git rm -r --cached .

This removes everything from the index, then just run:

git add .

Commit it:

git commit -m ".gitignore is now working"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)