Published
- 1 min read
git ignore .env files not working
The solution for this is noted below
git ignore .env files not working
Solution
If you have already added the files to be tracked,
you need to remove them from tracking:
git rm env.local --cached
git rm env.staging --cached
git commit -m "Stopped tracking env.local, and env.staging"
Try other methods by searching on the site. That is if this doesn’t work