How to create a .gitignore file?

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • gitignore

    A collection of useful .gitignore templates

  • When you create a new repository on GitHub you need to fill a form giving the name of the repo and making some decisions. One of these decisions is to add a .gitignore file based on some templates. They have explanations on ignoring files. The templates themselves are stored in this GitHub repository.

  • gitignore

    The largest collection of useful .gitignore templates (by toptal)

  • gitignore.io is an alternative way to generate the .gitignore file. It itself is an open source project. You can find its source code. It uses a separate list of templates. An interesting extra feature of this is that it can combine templates. So you could ask it to generate a template using Python and JavaScript and HTML. Well, you could, but I could not find the template neither for JavaScript nor for HTML. However I found one for Node. So we can combine Python with Node.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • gitignore.io

    Create useful .gitignore files for your project

  • gitignore.io is an alternative way to generate the .gitignore file. It itself is an open source project. You can find its source code. It uses a separate list of templates. An interesting extra feature of this is that it can combine templates. So you could ask it to generate a template using Python and JavaScript and HTML. Well, you could, but I could not find the template neither for JavaScript nor for HTML. However I found one for Node. So we can combine Python with Node.

  • gig

    Create .gitignore files from the command line using toptal gitignore (by damiensedgwick)

  • Damien Sedgwick recommended the tool he wrote called gig which is written in Rust and uses the API provide by the gitignore.io. Source of gig.

  • gitignore-online-generator

    A useful gitignore online generator.

  • Another option is the Gitignore Online Generator created by Michael Liao. The source code shows that it is based on the .gitignore templates by GitHub. It also allows the combination of the templates.

  • In the alternate universes, in which you use GitLab when you create a new project you can decide to Create from template and then they will include a gitignore file in the repository they create. You can view the templates and there are instruction on how to contribute to built-in project templates. The list of templates is a lot more limited here than in the list of languages in the other cases, but they create a skeleton for a whole project not just the .gitignore file.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts