Template Fork

 Growing Beyond GitHub’s gitignore Template List

Since Feb 13, 2013, 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 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, 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 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 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 
    // 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.’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

    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 to extend a template without modifying the original. This was extremely useful allowing to add ignore patterns to neglected templates. As 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 It also has a command line API.

  2. Support - If you like the project, please give the 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.


Now read this

Flappy Block

Flappy Bird Clone using the iOS7 Physics Engine #FlappyBird — Need anything else be said? The game is so simple, yet it mixes the right amount of frustration and entertainment that was in the early 90’s nintendo games like Double Dragon... Continue →