github/gitignore
View on GitHub ↗ ★ 176,132
A collection of useful .gitignore templates
54 mentions on Hacker News by 52 people: 19 stories, 35 comments · first 2010-11-08 · latest 2026-09-06
20082026
-
https://github.com/github/gitignore/blob/main/Global/macOS.g...
comment by brewmarche · 2026-09-06 · in .gitignore Everything by Default -
But they do: https://github.com/github/gitignore/blob/main/Global/VisualS... You need to merge the relevant ignore files to create one specific for you, so if you use VSCode on macOS VisualStudioCode.gitignore (e.g., .vscode) +…
comment by brewmarche · 2026-09-06 · in .gitignore Everything by Default -
Because it's insufficient? https://github.com/github/gitignore/blob/main/Rust.gitignore for example still falls victim to basically all of the issues specifically called out.
comment by piker · 2026-09-05 · in .gitignore Everything by Default -
…the gitignore templates for every programming language officially recommended by github itself - https://github.com/github/gitignore - funny how I did not see a single comment talk about this
comment by vivzkestrel · 2026-09-05 · in .gitignore Everything by Default -
…that. Personally, I just grab a gitignore file from GitHub and make a few tweaks here and there: https://github.com/github/gitignore/
comment by saila · 2026-02-23 · in Git's Magic Files -
…!*.go !go.sum !go.mod !README.md !LICENSE # ...even if they are in subdirectories !*/ [0] https://github.com/github/gitignore/blob/main/community/Gola...
comment by austinjp · 2025-09-05 · in .gitignore Everything by Default -
…to be for "Continuous Tests" [0] found through git blame [1] [0] https://continuoustests.com/ [1] https://github.com/github/gitignore/commit/2183a6c531d7085e2...
comment by fishgoesblub · 2025-09-03 · in Microsoft BASIC for 6502 Microprocessor – Version 1.1 -
Somebody didn't know about https://github.com/github/gitignore
comment by karunamurti · 2025-07-29 · in .gitignore Is Inherently Sisyphean -
…might fit if you shave off the square enough but large repos don't do this, they use a round peg: https://github.com/github/gitignore
comment by elijahwright_ · 2025-07-28 · in .gitignore Is Inherently Sisyphean -
Cool post. I highly suggest using templates from https://github.com/github/gitignore for your project as they tend to include a lot of files commonly found in them - eg .idea folders and so on.
comment by davydm · 2025-07-26 · in .gitignore Is Inherently Sisyphean -
…have it all in one huge file, but has a somewhat comprehensive template repo of many ecosystems: https://github.com/github/gitignore (This is what is used to populate the templates if you ask GitHub to include a gitignore when creating a…
comment by WorldMaker · 2024-07-23 · in Show HN: Lisp in C# -
You might want to put __pycache__ in your .gitignore, check here for example: https://github.com/github/gitignore/blob/main/Python.gitigno...
comment by steve1977 · 2024-07-19 · in Show HN: NetSour, CLI Based Wireshark -
…considering the GitHub .gitignore template for Node only ignores .env.local, not .local.env: https://github.com/github/gitignore/blob/main/Node.gitignore...
comment by Timon3 · 2023-08-19 · in Node.js 20.6.0 will include built-in support for .env files -
…Air Traffic Control. Github provides a Unity gitignore template, maybe it's best to start here? https://github.com/github/gitignore/blob/main/Unity.gitignor...
comment by smoldesu · 2022-08-13 · in Ask HN: Why is version control so hard? -
…pycache, pyc files). They make your repo very heavy. Take a look at this example .gitignore : https://github.com/github/gitignore/blob/main/Python.gitigno...
comment by cors-fls · 2022-02-25 · in Show HN: Terminal Based Wikipedia -
I would recomend recommend adding the language specific .gitignore file. (edit) https://github.com/github/gitignore
comment by scns · 2021-10-06 · in It is easier to educate a Do-er than to motivate the educated -
Interesting... a git commit is almost always represented as a diff... example: https://github.com/github/gitignore/commit/991e760c1c6d50fdd... Whether it's represeented as a diff internally seems completely irrelevant to me, even to…
comment by brabel · 2021-06-17 · in Nobody has found a use case for blockchain -
Useful for Mac users: https://github.com/github/gitignore/blob/master/Global/macOS...
comment by saagarjha · 2020-11-14 · in Pimp My Microwave -
…I followed the similar steps for https://gitignore.io I was doing a lot of development work and going to github.com/github/gitignore to copy templates from GitHub's website to my own file system was getting tedious. What I wanted was a…
comment by joeblau · 2018-01-10 · in Turning a side project into an open-source project -
You shouldn't put your node_modules into git. Try using this git ignore. https://github.com/github/gitignore/blob/master/Node.gitigno...
comment by brian_herman · 2017-09-10 · in A macOS app to generate app icons -
https://github.com/github/gitignore
comment by ciupicri · 2017-01-26 · in Create .gitignore files for your project -
…cache/internal files for most of the packages. edit : The .gitignore files that are served are from https://github.com/github/gitignore
comment by snehesht · 2016-05-28 · in Show HN: Gitignore.xyz – Get .gitignore files on the fly -
…and dev env dependent and they don't seem to be made for the same environment. Hardly comparable. https://github.com/github/gitignore/blob/master/Ruby.gitigno... https://github.com/github/gitignore/blob/master/Rails.gitign...
comment by pmontra · 2016-05-10 · in Language complexity, measured by how many rules GitHub's .gitignore has -
Just use this as your .gitignore file for every project https://github.com/github/gitignore/blob/master/Global/Emacs...
comment by kyllo · 2016-05-10 · in Show HN: Hydrogen, a multithread non-blocking Linux server framework in Rust -
What advantage does this have over just grabbing the file from https://github.com/github/gitignore directly?
comment by filmor · 2015-10-02 · in Joe – CLI Python tool for generating .gitignore files -
…By the way GitHub has a repository of .gitignore files for various tools and languages [1]. [1]: https://github.com/github/gitignore
comment by ciupicri · 2015-06-17 · in Why do you not make the code available under a 'source code repository'? -
…any case, this .gitignore is almost entirely the standard GitHub setup for Visual Studio projects. https://github.com/github/gitignore/blob/master/VisualStudio...
comment by djur · 2014-12-07 · in Show HN: Rant, a procedural text generation language -
…they all live in .idea. Github has a nice .gitignore build for these (and other common ignores): https://github.com/github/gitignore/blob/master/Global/JetBr...
comment by ericcholis · 2014-06-13 · in Write Clean, Professional, Maintainable, Quality Code in Python -
…Urgh this is an annoying new step to node development Someone should tell github the new way... https://github.com/github/gitignore/blob/master/Node.gitigno...
comment by tlarkworthy · 2014-03-28 · in The npm debacle is partly your fault (and here's what you can do about it) -
…a 2.3 app. (tho i can't find a .gitignore for it https://github.com/fortuity/rails3-gitignore https://github.com/github/gitignore/blob/master/Rails.gitign...
comment by gtani · 2013-07-26 · in How to hack a Rails app using its secret_token -
You could try to partially reuse: https://github.com/github/gitignore Which try to be a gitignore database.
comment by gcmalloc · 2013-02-16 · in Show HN: Generate useful .gitignore files for your project -
Maybe not so intrusive, but they could add it to https://github.com/github/gitignore/blob/master/Ruby.gitigno... . Not sure how many people use that repo tough.
comment by enkrs · 2012-12-26 · in Reminder: secret_token.rb is named so for a reason -
…project. Comment links to active list of gitignore files on git hub, which solves initial problem: https://github.com/github/gitignore Nothing to see here. Why not link to the github repo instead?
comment by alttag · 2011-08-10 · in Files All Version Control Should Ignore -
I believe these are already covered: https://github.com/github/gitignore/blob/master/Python.gitignore https://github.com/github/gitignore/blob/master/Global/OSX.gitignore
comment by __mt0d · 2010-11-21 · in A Collection of Useful .gitignore Templates