简体   繁体   中英

gitignore file ignore cachebusted files

I have my .gitignore working fine but for some reason I cannot get it to ignore my /min folder which contains, among other things, my cache busted js in the format of whatever.min.v0.0.1.js

Here is my current .gitignore file:

node_modules/
.sass-cache/
public/stylesheets/*.css
public/min/*.js

How do I get it to ignore just everything in the public/min folder?

Your ignore rule looks correct as long as that is the correct folder structure so my guess is that you are trying to ignore files which you were previously tracking changes on?

Try running the following:

git rm --cached public/min/*

That should clear any tracked files within the min folder and from now on your .gitignore rule should work correctly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM