Search code examples
gitgitignore

Is there a tried and tested way of creating a .gitignore with all the known recommend ignores?


Bit of a random question - but is there a known method for creating .gitignore files for recommended frameworks etc etc, for example:

Django:

*.pyc
db.sqlite3

node.js (and others):

/node_modules

php:

env.local.php

Just seems like I either a.) can't find this or b.) I'm not using git init or .gitignore creation correctly?


Solution

  • I really like the gitignore templates from https://www.gitignore.io

    enter image description here

    Eg.

    and you could also combine multiple frameworks, eg vim+visual studio: https://www.gitignore.io/api/vim%2Cvisualstudio

    Last but not least, you could even integrate gitingore.io into the command line, so you could execute: $ gi linux,java. See the docs for that