-
Commit all your changes
-
Remove everything from the repository cache. Go to your repo directory and run this command.
git rm -r --cached .
It will only clear the cache. Your files and git history will stay.
- Re add everything
git add .
- Commit the fix
git commit -m 'fix .gitignore'
Sit back and relax. It'd done.