0

How to git ignore files under sub directories. We have lots of files which we would like to ignore under sub directories.

(e.g. db/schema.rb or config/database.yml)
Rpj
  • 5,348
  • 16
  • 62
  • 122

2 Answers2

0

you can do something like:

db/schema.rb
db/*
!db/*/

first will ignore the schema.rb The mixture of second and third will ignore all files in db/ but unignore all directories in db/

Hamster
  • 680
  • 7
  • 23
0

Try adding

*/*.rb
*/*.yml

to your .gitignore

More info here: Git ignore sub folders

Community
  • 1
  • 1
industryworker3595112
  • 3,419
  • 2
  • 14
  • 18