Reputation: 9805
Here is the content of a gitignore of YADR, a popular project built on top of zsh :
1 # OSX taken from: https://github.com/github/gitignore/blob/master/Global/OSX.gitignore
2 # ----------------------------------------------------------------------------------------------
3 .DS_Store
4 # Thumbnails
5 ._*
6 # Files that might appear on external disk
7 .Spotlight-V100
8 .Trashes
9
10 # Windows taken from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
11 # ----------------------------------------------------------------------------------------------
12 # Windows image file caches
13 Thumbs.db
...
That looks like an awful solution.
=> Is it not possible to include multiple gitignore, and have them maintained separately ?
Upvotes: 2
Views: 416
Reputation: 1325137
There is no include in a .gitignore
for now (Git 2.18, 2018), as (not) seen in the gitignore man page.
The composition is done through multiple .gitignore
files at multiple folder levels (one .gitignore
per folder): the .gitignore
in the deepest folder adds its rules to the ones from .gitignore
of direct parent folders.
Upvotes: 3