Tip
You can now use the gitignore api endpoint and a gh alias to achieve the same result as this project:
$ gh alias set --shell .gitignore 'gh api -X GET /gitignore/templates/"$1" --jq ".source"'
$ gh .gitignore Terraform >> .gitignore
This gh
extension enables developers to quickly bootstrap new projects with the appropriate .gitignore
through a CLI interface.
gh extension install garnertb/gh-gitignore
Bootstrap a node project with the nodejs gitignore.
gh gitignore node > .gitignore
gh gitignore
currently supports the following gitignore flavors:
al, actionscript, ada, agda, android, appengine, appceleratortitanium, archlinuxpackages, autotools, c++, c, cfwheels, cmake, cuda, cakephp, chefcookbook, clojure, codeigniter, commonlisp, composer, concrete5, coq, craftcms, d, dm, dart, delphi, drupal, episerver, eagle, elisp, elixir, elm, erlang, expressionengine, extjs, fancy, finale, flaxengine, forcedotcom, fortran, fuelphp, gwt, gcov, gitbook, go, godot, gradle, grails, haskell, igorpro, idris, jboss, jenkins_home, java, jekyll, joomla, julia, kicad, kohana, kotlin, labview, laravel, leiningen, lemonstand, lilypond, lithium, lua, magento, maven, mercury, metaprogrammingsystem, nanoc, nim, node, ocaml, objective-c, opa, opencart, oracleforms, packer, perl, phalcon, playframework, plone, prestashop, processing, purescript, python, qooxdoo, qt, r, ros, racket, rails, raku, rhodesrhomobile, ruby, rust, scons, sass, scala, scheme, scrivener, sdcc, seamgen, sketchup, smalltalk, stella, sugarcrm, swift, symfony, symphonycms, tex, terraform, textpattern, turbogears2, twincat3, typo3, unity, unrealengine, vvvv, visualstudio, waf, wordpress, xojo, yeoman, yii, zendframework, zephir