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

前端 未结 3 1934
没有蜡笔的小新
没有蜡笔的小新 2020-12-05 10:09

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

Can I simply include th

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-05 10:55

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

    • You can use the web to generate a template at https://gitignore.io
    • You can install gitignore via command line to type

      gi cvs,vim,svn
      

      output: https://www.gitignore.io/api/cvs,vim,svn

    • You can also update your existing templates using this url: https://www.gitignore.io/?templates=cvs,vim,svn

    • And finally, you can contribute to the list of templates which merges @github/gitignore and over 100 other community templates to create the largest repository of templates at: https://github.com/dvcs/gitignore

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

提交回复
热议问题