I want to exclude all file named Web.config from every folder in my directory expect when the parent folder is named 'Views'
Ex directory:
-Root
  -ApiProject
      -Web.config (should exclude)
      -SomeOther.file (should allow)
      -SubFolder     (should allow)
          -one.file     (should allow)
          -two.file     (should allow)
  -MvcProject
      -Web.config (should exclude)
      -Views
          -Web.config (should allow)
I have tried via the below in the .gitignore file, but doesnt seem to be working. The Web.config in the Views folder is not being added
[Ww]eb.config
!**/Views/[Ww]eb.config
 
     
    