0

Suppose my Code Base is like this:

├── index.php
├── _application
|   ├── controllers
|   └── Views
└── _jobs
    ├── report.js
    ├── report.html
    ├──_foo
    |  ├──001....
    |  ├──002....
    └──_bar
       ├──001....
       ├──002....

Here foo & bar are folders within the jobs folder, and there could be any number of folders, and I don't know their names in advance.

Using GitIgnore, I want to ignore all folders within 'jobs' folder, but not the files that are present there.

I have looked at How to ignore all subfolders in a folder with .gitignore, but the solution given there ignores the files in the job folder as well.

Community
  • 1
  • 1
Devdatta Tengshe
  • 4,015
  • 10
  • 46
  • 59

1 Answers1

1

Add this !/jobs/*.*, it means, don't ignore anything with an extension which means they are files

Trash Can
  • 6,608
  • 5
  • 24
  • 38