The way my project is set up all .js
files are generated from other file types except the .js
files in the top level of my repo.
How do I configure my .gitignore to ignore any .js
file that is not in the top level of my repo?
I have tried
/**/*.js
and
**/*.js
!*.js
and several variations on those, but they seem to always just include or exclude all .js
files.
You can try the next approach:
*.js
!/*.js
So the result .gitignore
should contain next two lines in correct order:
*.js
!/*.js
*/**/*.js
(在变量“ 1”之前添加固定的通配符)应执行此操作。
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.