close
The Wayback Machine - https://web.archive.org/web/20200518191201/https://github.com/github/gitignore
Skip to content
A collection of useful .gitignore templates
Branch: master
Clone or download

Latest commit

ch4ot1c Add .yarn/install-state.gz to Node.gitignore (#3407)
After running `yarn set version berry` and `yarn install`, the file `.yarn/install-state.gz` is created.

The documentation at https://yarnpkg.com/advanced/qa#which-files-should-be-gitignored mentions that this file should be ignored:

> .yarn/install-state.tgz is an optimization file that you shouldn't have to ever commit. It simply stores the exact state of your project so that the next commands can boot without having to resolve your workspaces again.

The documentation has a minor error; the generated file is `.gz` instead of `.tgz` (source: https://github.com/yarnpkg/berry/pull/998/files#diff-23dd4c2e823c25186f1107e88e962032R201)
Latest commit 7293c14 May 14, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Image .github Trim trailing whitespace Jun 5, 2018
Image Global Ignore Local History folder (#3008) Apr 4, 2020
Image community Ignore AWS Serverless Application Model build folder (#3357) Apr 4, 2020
Image .travis.yml .travis.yml: Trim trailing whitespace and indent (#3118) Jul 21, 2019
Image Actionscript.gitignore Fix comments on same line causing ignore to break Aug 11, 2017
Image Ada.gitignore ensure single trailing newline Mar 27, 2014
Image Agda.gitignore Add MAlonzo directory. (#2978) Mar 8, 2019
Image Android.gitignore Added aar file type to gitignore (#3233) Nov 17, 2019
Image AppEngine.gitignore Added template for Google App Engine Jan 16, 2015
Image AppceleratorTitanium.gitignore Added Appcelerator Titanium .gitignore file. Aug 23, 2012
Image ArchLinuxPackages.gitignore Add .jar, .exe and .msi May 28, 2015
Image Autotools.gitignore Update Autotools.gitignore. (#3337) Mar 12, 2020
Image C++.gitignore added prerequisites for C and C++ Jun 29, 2016
Image C.gitignore Update C.gitignore Oct 31, 2016
Image CFWheels.gitignore add cfwheels gitignore Feb 22, 2011
Image CMake.gitignore Ignore CMake FetchContent directory Jan 23, 2019
Image CONTRIBUTING.md Trim trailing whitespace Jun 5, 2018
Image CUDA.gitignore Add CUDA.gitignore Mar 15, 2015
Image CakePHP.gitignore Update CakePHP.gitignore Nov 20, 2015
Image ChefCookbook.gitignore Remove lockfiles from Chef template Mar 6, 2014
Image Clojure.gitignore Add .gitignore for Leiningen projects Apr 8, 2011
Image CodeIgniter.gitignore Merge branch 'master' into codeigniter3update Feb 2, 2017
Image CommonLisp.gitignore Update CommonLisp.gitignore Dec 27, 2016
Image Composer.gitignore Fix link to go to current anchor Oct 27, 2017
Image Concrete5.gitignore Update concrete5 gitignore (#3176) Feb 10, 2020
Image Coq.gitignore Add generated timing files to Coq.gitignore (#3367) Apr 7, 2020
Image CraftCMS.gitignore Craft: update to follow official recs; add 'not necessary in v3' note Jun 22, 2018
Image D.gitignore Update D.gitignore Jun 6, 2016
Image DM.gitignore ensure single trailing newline Mar 27, 2014
Image Dart.gitignore Dart: Ignore .flutter-plugins (#3398) May 6, 2020
Image Delphi.gitignore Update Delphi.gitignore Oct 12, 2018
Image Drupal.gitignore Update Drupal.gitignore (#3329) Mar 11, 2020
Image EPiServer.gitignore ensure single trailing newline Mar 27, 2014
Image Eagle.gitignore Eagle: Remove duplicate entry Jun 18, 2018
Image Elisp.gitignore add final newline Oct 26, 2016
Image Elixir.gitignore ignore files generated by ElixirLS Nov 6, 2018
Image Elm.gitignore Ignore elm-stuff project-wide Jul 28, 2016
Image Erlang.gitignore Add rebar3 tool files and directories (#3178) Sep 16, 2019
Image ExpressionEngine.gitignore Merge pull request #488 from nanadevelopment/eeConfigAdd Nov 11, 2013
Image ExtJs.gitignore Adds some files Sep 7, 2017
Image Fancy.gitignore ensure single trailing newline Mar 27, 2014
Image Finale.gitignore ensure single trailing newline Oct 6, 2013
Image ForceDotCom.gitignore ensure single trailing newline Oct 6, 2013
Image Fortran.gitignore Link a new fortran template to existing c++ one Jul 16, 2014
Image FuelPHP.gitignore update FuelPHP.gitignore Dec 8, 2014
Image GWT.gitignore GWT: Remove duplicate entry Jun 18, 2018
Image Gcov.gitignore Capitalise initial letter in template filenames for consistency/sorting Jan 7, 2015
Image GitBook.gitignore Correct URL for NPM URL reference Feb 5, 2015
Image Go.gitignore ignore vendor directory (#3033) May 5, 2019
Image Godot.gitignore [Godot] Ignore imported translations (#3269) Jan 20, 2020
Image Gradle.gitignore Ignore Gradle subproject build dir (#3370) Apr 14, 2020
Image Grails.gitignore Adding additional comments Sep 8, 2014
Image Haskell.gitignore Add *.hie to Haskell.gitignore (#3120) Jul 21, 2019
Image IGORPro.gitignore Create IGORPro.gitignore Dec 3, 2014
Image Idris.gitignore Add an Idris gitignore Feb 28, 2014
Image JBoss.gitignore correct capitalization problems and add Octave which link to MATLAB Nov 26, 2018
Image JENKINS_HOME.gitignore Improved JENKINS_HOME example (#3332) Mar 11, 2020
Image Java.gitignore Added NiFi .nar files Apr 12, 2018
Image Jekyll.gitignore Update Jekyll.gitignore (#2540) Dec 5, 2017
Image Joomla.gitignore Updating Joomla.gitignore to Joomla! 3.9.8 (#3090) Jun 23, 2019
Image Julia.gitignore Add more standard ignored files for Julia (#2992) Mar 14, 2019
Image KiCad.gitignore Add *.sch-bak to KiCad.gitignore (#3153) Aug 20, 2019
Image Kohana.gitignore ensure single trailing newline Oct 6, 2013
Image Kotlin.gitignore Symlink Kotlin.gitignore to Java.gitignore Feb 25, 2016
Image LICENSE Use the exact CC-0 license text Oct 28, 2016
Image LabVIEW.gitignore Ignore the .cache folder for LabVIEW projects May 9, 2018
Image Laravel.gitignore Update Laravel.gitignore (#3098) Jun 27, 2019
Image Leiningen.gitignore Update .gitignore with .cpcache Mar 18, 2018
Image LemonStand.gitignore ensure single trailing newline Oct 6, 2013
Image Lilypond.gitignore Add ignore file for lilypond. Feb 22, 2011
Image Lithium.gitignore The Lithium app should be the root repo folder Sep 1, 2012
Image Lua.gitignore Added a .gitignore template for Lua based projects. Jan 3, 2015
Image Magento.gitignore Remove patch files from repo Sep 25, 2018
Image Maven.gitignore Reference why to exclude binary jar, fixes #111 (#3154) Aug 20, 2019
Image Mercury.gitignore Mercury.gitignore: Add Mercury.modules Jan 9, 2015
Image MetaProgrammingSystem.gitignore Grammar/formatting tweak to comments Jun 12, 2014
Image Nanoc.gitignore Nanoc: Ignore tmp/nanoc/, not tmp/ Aug 29, 2017
Image Nim.gitignore Updated Nim.gitignore (#3172) Sep 10, 2019
Image Node.gitignore Add .yarn/install-state.gz to Node.gitignore (#3407) May 14, 2020
Image OCaml.gitignore Update OCaml.gitignore (#3010) Mar 21, 2019
Image Objective-C.gitignore Improving the documentation of Objective-C and Swift files (#3133) Aug 7, 2019
Image Opa.gitignore Added Opa.gitignore Mar 3, 2012
Image OpenCart.gitignore excluding vqmod cache files and logs Oct 15, 2016
Image OracleForms.gitignore added gitignore for Oracle Forms development Mar 19, 2012
Image Packer.gitignore Add crash.log to Packer.gitignore (#3230) Nov 8, 2019
Image Perl.gitignore spelling: utils Nov 8, 2017
Image Phalcon.gitignore Remove trailing asterisks in Phalcon rules Mar 21, 2014
Image PlayFramework.gitignore Added /project/project to PlayFramework.gitignore Feb 22, 2017
Image Plone.gitignore Covered by global vim template Nov 12, 2013
Image Prestashop.gitignore Update for Prestashop 1.7 (#3261) Mar 11, 2020
Image Processing.gitignore Ignore transpiled .java and .class files (#3016) Mar 27, 2019
Image PureScript.gitignore Update PureScript adding .spago (#3278) Jan 21, 2020
Image Python.gitignore Remove pip-wheel-metadata/ from Python.gitignore (#3364) Apr 11, 2020
Image Qooxdoo.gitignore Add gitignore for qooxdoo apps Feb 22, 2011
Image Qt.gitignore Extend Qt.gitignore with qmlcache qrc files (#3322) Mar 12, 2020
Image R.gitignore Update R.gitignore (#3354) Mar 28, 2020
Image README.md update README (#3248) Mar 12, 2020
Image ROS.gitignore Added ignore for files created by `catkin_make_isolated` Jan 26, 2018
Image Rails.gitignore Add /public/uploads for file upload gem Shrine (#3333) Mar 11, 2020
Image Raku.gitignore Changes the name of Perl 6 to Raku (#3312) Feb 19, 2020
Image RhodesRhomobile.gitignore Add Rhodes mobile application framework gitignore Nov 9, 2010
Image Ruby.gitignore Ruby: ignore RuboCop remote inherited config files (#3197) Oct 4, 2019
Image Rust.gitignore Update documentation link cargo.toml vs cargo.lock Mar 13, 2018
Image SCons.gitignore Update SCons.gitignore (#3001) Mar 18, 2019
Image Sass.gitignore Add all sourcemap file formats May 24, 2018
Image Scala.gitignore [Scala] remove external tools excludes. Feb 16, 2017
Image Scheme.gitignore Add Scheme.gitignore Aug 22, 2015
Image Scrivener.gitignore Added new checksums and allows for relative directories (#3128) Sep 20, 2019
Image Sdcc.gitignore ensure single trailing newline Oct 6, 2013
Image SeamGen.gitignore Update SeamGen.gitignore Jul 31, 2012
Image SketchUp.gitignore Add gitignore for sketchup backup files. Jan 18, 2012
Image Smalltalk.gitignore Merge pull request #2027 from rejurime/dolphin-smalltalk Nov 23, 2018
Image Stella.gitignore Capitalise initial letter in template filenames for consistency/sorting Jan 7, 2015
Image SugarCRM.gitignore ensure the following ! rules are included May 15, 2017
Image Swift.gitignore Improving the documentation of Objective-C and Swift files (#3133) Aug 7, 2019
Image Symfony.gitignore Ignore logs for Symfony4 Aug 8, 2018
Image SymphonyCMS.gitignore added symphony and workspace/uploads dir Apr 11, 2012
Image TeX.gitignore Changed TeX to not ignore tikz files by default. (#3320) Feb 25, 2020
Image Terraform.gitignore Ignore Terraform CLI configuration files (#3359) Apr 4, 2020
Image Textpattern.gitignore Added Textpattern gitignore Jan 17, 2012
Image TurboGears2.gitignore Add for TurboGears2 (based off of Python template) Nov 9, 2010
Image Typo3.gitignore Merge pull request #1646 from josefglatz/TYPO3-improvements Jun 17, 2018
Image Umbraco.gitignore Add ignore to umbraco folder (#3307) Feb 21, 2020
Image Unity.gitignore Add Unity's Addressables and Android's temp files. (#3311) Mar 11, 2020
Image UnrealEngine.gitignore Revert "add the *.VC.db to unreal engine ignore" Jun 18, 2018
Image VVVV.gitignore ensure single trailing newline Mar 27, 2014
Image VisualStudio.gitignore Add FodyWeavers.xsd to VisualStudio.gitignore (#3380) Apr 21, 2020
Image Waf.gitignore Waf: Be more explicit in patterns Mar 24, 2016
Image WordPress.gitignore Updated ignored list (#2972) May 12, 2019
Image Xojo.gitignore Ignores *.xojo_uistate Sep 14, 2014
Image Yeoman.gitignore Create Yeoman.gitignore Oct 21, 2013
Image Yii.gitignore Merge remote-tracking branch 'origin/master' into pr/506 Nov 11, 2013
Image ZendFramework.gitignore Remove double-spaced lines Sep 12, 2017
Image Zephir.gitignore Added comments for Zephir Jun 21, 2014

README.md

A collection of .gitignore templates

This is GitHub’s collection of .gitignore file templates. We use this list to populate the .gitignore template choosers available in the GitHub.com interface when creating new repositories and files.

For more information about how .gitignore files work, and how to use them, the following resources are a great place to start:

Folder structure

We support a collection of templates, organized in this way:

  • the root folder contains templates in common use, to help people get started with popular programming languages and technologies. These define a meaningful set of rules to help get started, and ensure you are not committing unimportant files into your repository
  • Global contains templates for various editors, tools and operating systems that can be used in different situations. It is recommended that you either add these to your global template or merge these rules into your project-specific templates if you want to use them permanently.
  • community contains specialized templates for other popular languages, tools and project, which don't currently belong in the mainstream templates. These should be added to your project-specific templates when you decide to adopt the framework or tool.

What makes a good template?

A template should contain a set of rules to help Git repositories work with a specific programming language, framework, tool or environment.

If it's not possible to curate a small set of useful rules for this situation, then the template is not a good fit for this collection.

If a template is mostly a list of files installed by a particular version of some software (e.g. a PHP framework), it could live under the community directory. See versioned templates for more details.

If you have a small set of rules, or want to support a technology that is not widely in use, and still believe this will be helpful to others, please read the section about specialized templates for more details.

Include details when opening pull request if the template is important and visible. We may not accept it immediately, but we can promote it to the root at a later date based on interest.

Please also understand that we can’t list every tool that ever existed. Our aim is to curate a collection of the most common and helpful templates, not to make sure we cover every project possible. If we choose not to include your language, tool, or project, it’s not because it’s not awesome.

Contributing guidelines

We’d love for you to help us improve this project. To help us keep this collection high quality, we request that contributions adhere to the following guidelines.

  • Provide a link to the application or project’s homepage. Unless it’s extremely popular, there’s a chance the maintainers don’t know about or use the language, framework, editor, app, or project your change applies to.

  • Provide links to documentation supporting the change you’re making. Current, canonical documentation mentioning the files being ignored is best. If documentation isn’t available to support your change, do the best you can to explain what the files being ignored are for.

  • Explain why you’re making a change. Even if it seems self-evident, please take a sentence or two to tell us why your change or addition should happen. It’s especially helpful to articulate why this change applies to everyone who works with the applicable technology, rather than just you or your team.

  • Please consider the scope of your change. If your change is specific to a certain language or framework, then make sure the change is made to the template for that language or framework, rather than to the template for an editor, tool, or operating system.

  • Please only modify one template per pull request. This helps keep pull requests and feedback focused on a specific project or technology.

In general, the more you can do to help us understand the change you’re making, the more likely we’ll be to accept your contribution quickly.

Versioned templates

Some templates can change greatly between versions, and if you wish to contribute to this repository we need to follow this specific flow:

  • the template at the root should be the current supported version
  • the template at the root should not have a version in the filename (i.e. "evergreen")
  • previous versions of templates should live under community/
  • previous versions of the template should embed the version in the filename, for readability

This helps ensure users get the latest version (because they'll use whatever is at the root) but helps maintainers support older versions still in the wild.

Specialized templates

If you have a template that you would like to contribute, but it isn't quite mainstream, please consider adding this to the community directory under a folder that best suits where it belongs.

The rules in your specialized template should be specific to the framework or tool, and any additional templates should be mentioned in a comment in the header of the template.

For example, this template might live at community/DotNet/InforCRM.gitignore:

# gitignore template for InforCRM (formerly SalesLogix)
# website: https://www.infor.com/product-summary/cx/infor-crm/
#
# Recommended: VisualStudio.gitignore

# Ignore model files that are auto-generated
ModelIndex.xml
ExportedFiles.xml

# Ignore deployment files
[Mm]odel/[Dd]eployment

# Force include portal SupportFiles
!Model/Portal/*/SupportFiles/[Bb]in/
!Model/Portal/PortalTemplates/*/SupportFiles/[Bb]in

Contributing workflow

Here’s how we suggest you go about proposing a change to this project:

  1. Fork this project to your account.
  2. Create a branch for the change you intend to make.
  3. Make your changes to your fork.
  4. Send a pull request from your fork’s branch to our master branch.

Using the web-based interface to make changes is fine too, and will help you by automatically forking the project and prompting to send a pull request too.

License

CC0-1.0.

You can’t perform that action at this time.