Does .gitignore just not work?
I added the env file to my .gitignore and it literally does nothing, vscode still keeps trying to stage it and it can still be commited
Solution:Jump to solution
If it was included in a previous commit, you must remove it from the index, this should do the trick:
git rm --cached <file>
. More info at https://stackoverflow.com/questions/1274057/how-do-i-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore3 Replies
the env file is in the src folder
Solution
If it was included in a previous commit, you must remove it from the index, this should do the trick:
git rm --cached <file>
. More info at https://stackoverflow.com/questions/1274057/how-do-i-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignoreight
that worked thx