Gitignore.io Template Fork

Growing Beyond GitHub’s gitignore Template List #

Since Feb 13, 2013, gitignore.io relied on GitHub’s list of gitignore templates to power the website. GitHub maintains the most popular gitignore template list as reflected by it’s 50,000+ stars. As gitignore.io grows, our community faces challenges relying on GitHub’s template list.

  1. Responsiveness - GitHub maintains a popular template list, but is slow to merge pull requests. This results in slow updates to templates and certain developers simply abandoning their requests.

  2. Acceptance - gitignore templates must meet contributing guideline requirements preventing merges from small and undocumented projects. As a result, gitignore.io already has twice as many gitignore templates.

  3. Composition - Larger templates, such as the Objective-C.gitignore, can not be composed from smaller templates. Objective-C.gitignore includes Cocoapods, Carthage, Fastlane, and iOSInjectionProject which should all be separate templates.

  4. Inheritance - The JetBrains template is an example where one template has multiple uses. All Idea IDE’s ignore the same core list of files. If a C++ developer is working in CLion, the CLion template should inherit from the JetBrains template.

  5. Extension - GitHub’s original template list challenged developers who wanted functionality but were not accepted because point 1 and 2. The community needed a way to make changes that weren’t accepted by the main repository, but still made sense.

The Plan #

Todays fork plans to address all five issues.

  1. Responsiveness - I am migrating to the https://github.com/dvcs/gitignore repository with the goal of merging pull requests and/or providing feedback within 5 days.

  2. Acceptance - I will accept all templates that make sense. If you have a new template or modification to an existing template, I will merge it. Occasionally, developers submit templates without fully understanding the architecture of gitignore.io so I will work to make sure each pull request can be merged using one of the following three features.

  3. Composition - I’m introducing a new .stack file extension to support composition. The ReactNative template combines multiple templates with the stack design pattern.

    Here is the example for React Native:

    // Base - Base template 
    ReactNative.gitignore
    
    // Stack - Templates added to the base template
    ReactNative.Android.stack@ -> Android.gitignore
    ReactNative.Buck.stack@ -> Buck.gitignore
    ReactNative.Gradle.stack@ -> Gradle.gitignore
    ReactNative.Linux.stack@ -> Linux.gitignore
    ReactNative.Node.stack@ -> Node.gitignore
    ReactNative.Xcode.stack@ -> Xcode.gitignore
    ReactNative.macOS.stack@ -> macOS.gitignore
    

    There is a base react native template, then each stack with follows the format <Base>.<Stack>.stack symlinked to <Stack>.gitignore.

    Gitignore.io’s template generation engine will compose all of the stacks into the final template at run-time resulting in the final template.

  4. Inheritance - This happens through symlinks from the child to the parent template. JetBrains is the largest collection of templates that use symlinks on gitignore.io.

    JetBrains.gitignore
    AppCode.gitignore@ -> JetBrains.gitignore
    CLion.gitignore@ -> JetBrains.gitignore
    Intellij.gitignore@ -> JetBrains.gitignore
    JetBrains+all.gitignore@ -> JetBrains.gitignore
    JetBrains+iml.gitignore@ -> JetBrains.gitignore
    PhpStorm.gitignore@ -> JetBrains.gitignore
    PyCharm.gitignore@ -> JetBrains.gitignore
    RubyMine.gitignore@ -> JetBrains.gitignore
    WebStorm.gitignore@ -> JetBrains.gitignore
    
  5. Extension - The .patch file extension allows gitignore.io to extend a template without modifying the original. This was extremely useful allowing gitignore.io to add ignore patterns to neglected templates. As gitignore.io cleans up the template list, this will see less usage.

Going forward #

  1. Use - If you need to create a useful gitignore file for your project, checkout https://www.gitignore.io. It also has a command line API.

  2. Support - If you like the project, please give the gitignore.io and template repositories a star.

  3. Contribute - Please submit a pull request if you have a project with .giignore template that is not in our repository.

 
79
Kudos
 
79
Kudos

Now read this

Bitcoin ETF

A lot of people have been asking for my thoughts on the ETF and what I think it will do to the price of crypto. To get the answer, we need to travel back to 1978 when Congress passed the Revenue Act. This bill included Section 401(k),... Continue →