I am using visual studio code to work with an angular project.
Every time I compiled my project with ng serve
and then git status
to verify my changes, the changes is full of .angular/cache/14.2.0/babel-webpack/ changes and it occupies all of my terminal lines. Like this
Also under these "cache" changes, there are a path "src/app/services/" shown, I guess it helps with the answer?
How can I tell git to ignore these "cache" changes? Thank you.
CodePudding user response:
First: Create a file with name .gitignore.txt on root folder of project (same level with src folder).
Second: add this line to this file
/.angular/cache
like this:
# See http://help.github.com/ignore-files/ for more about ignoring files.
# misc
/.angular/cache
note: # tag in this file is comment
And upload .gitignore.txt file to git.
Hope this help!