I've appropriately configured a .gitignore file and put it in the base directory of my project, but when I go to the git tab of Visual Studio Code it does not ignore the folder that I'm trying to ignore and therefore is suggesting that there are changes for 4000+ files that I don't care about (the folder that I'm trying to ignore is a virtual environment for python).
Has anyone else successfully gotten the git tab to ignore changes using the .gitignore file?
Gitignore doesn't affect the files which are already tracked.
To stop tracking a file that is currently tracked, use git rm --cached <dir>. It removes the file from the staging area entirely, but doesn't delete the directory from disk; instead leaves the directory as it is.
What worked for me was I right clicked any one of the file(while the git tab is selected) under changes menu which I didn't wanted and was also in one of the directories mentioned in the .gitignore file. After right clicking I selected Add file to .gitignore and boom all the unwanted 5k files went from git tab. And I was happy :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With