Hacker GitHub

← All repos

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

Mentions per year 54 mentions · busiest year 2022 (6)
20082026
  1. https://github.com/github/gitignore/blob/main/Global/macOS.g...
    comment by brewmarche · 2026-09-06 · in .gitignore Everything by Default
  2. 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
  3. 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
  4. …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
  5. …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
  6. …!*.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
  7. …to be for "Continuous Tests" [0] found through git blame [1] [0] https://continuoustests.com/ [1] https://github.com/github/gitignore/commit/2183a6c531d7085e2...
  8. Somebody didn't know about https://github.com/github/gitignore
    comment by karunamurti · 2025-07-29 · in .gitignore Is Inherently Sisyphean
  9. …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
  10. 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
  11. …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#
  12. 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
  13. …considering the GitHub .gitignore template for Node only ignores .env.local, not .local.env: https://github.com/github/gitignore/blob/main/Node.gitignore...
  14. …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?
  15. …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
  16. I would recomend recommend adding the language specific .gitignore file. (edit) https://github.com/github/gitignore
  17. 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…
  18. Useful for Mac users: https://github.com/github/gitignore/blob/master/Global/macOS...
    comment by saagarjha · 2020-11-14 · in Pimp My Microwave
  19. That's not the only problem. Apple leaves a whole bunch of "mac droppings" all over the place: https://github.com/github/gitignore/blob/master/Global/macOS... The worst part is that .DS_Store assumes, even on remote (SMB) filesystems, that…
    comment by kstenerud · 2019-07-03 · in .DS_Store
  20. …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…
  21. 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
  22. https://github.com/github/gitignore
    comment by ciupicri · 2017-01-26 · in Create .gitignore files for your project
  23. …cache/internal files for most of the packages. edit : The .gitignore files that are served are from https://github.com/github/gitignore
  24. …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...
  25. Just use this as your .gitignore file for every project https://github.com/github/gitignore/blob/master/Global/Emacs...
  26. What advantage does this have over just grabbing the file from https://github.com/github/gitignore directly?
  27. …By the way GitHub has a repository of .gitignore files for various tools and languages [1]. [1]: https://github.com/github/gitignore
  28. …any case, this .gitignore is almost entirely the standard GitHub setup for Visual Studio projects. https://github.com/github/gitignore/blob/master/VisualStudio...
  29. …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...
  30. …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...
  31. …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...
  32. You could try to partially reuse: https://github.com/github/gitignore Which try to be a gitignore database.
  33. 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.
  34. …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
  35. 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