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
  • 4,194
  • 12
  • 43
  • 94

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
  • 640
  • 7
  • 21
0

Try adding

*/*.rb
*/*.yml

to your .gitignore

More info here: Git ignore sub folders

Community
  • 1
  • 1
industryworker3595112
  • 3,078
  • 1
  • 13
  • 18