Can I include other .gitignore file in a .gitignore file? (like #include in c-like languages)

Viewed 11626

I have some files like vim.gitignore, SVN.gitignore and CVS.gitignore (spread around on my hard disk).

Can I simply include these gitignore files in a .gitignore file in a new Git project?

Edit: I have a global ignore file already.
I just want to ignore different files in different types of projects, is this possible?

3 Answers

I run the a project that hosts the largest amount of gitignore templates and it's extremely easy to use.

This doesn't allow anyone to include sub-templates, but it does generate one large template from individual git templates.

Related