In my project, I have generated files Widget.js in project subfolders, so I git-ignore them with this rule:
widgets/*/Widget.js
so it ignores files like:
But now, in one specific folder, I want to include this file to repository. E.g.: file
should be included.
Is there any possibility to set the rules as I need?
Use ! to add this file again https://git-scm.com/docs/gitignore#_pattern_format.
Just add
!widgets/include_1/Widget.js
after
widgets/*/Widget.js