I have the folder application/ which I add to the .gitignore. Inside the application/ folder is the folder application/language
application/
.gitignore
application/language
So , since many programmers uses node . the use case which meets this question is to exclude node_modules except one module module-a for example:
node_modules
module-a
!node_modules/ node_modules/* !node_modules/module-a/