Never tried it, but git help ignore
suggests that if you put a .gitignore
with *.js
in /public/static
, it will do what you want.
Note: make sure to also check out Joeys' answer below: if you want to ignore files in a specific subdirectory, then a local .gitignore is the right solution (locality is good). However if you need the same pattern to apply to your whole repo, then the ** solution is better.