You shouldn’t have to delete anything. After you added the .gitignore file, run this command to clear the cache, then stage and commit again:
git rm -r . --cached
You shouldn’t have to delete anything. After you added the .gitignore file, run this command to clear the cache, then stage and commit again:
git rm -r . --cached