frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

.gitignore Everything by Default

https://packagemain.tech/p/gitignore-everything-by-default
13•der_gopher•1h ago

Comments

matthewmc3•1h ago
I'm not convinced about ignoring everything, but one of the best changes I ever made to my git workflow was ignoring all dotfiles by default by adding `.*` to ~/.config/git/ignore.

My projects do now have to have a boiler plate of unignoring the common ones (!.gitignore, !.gitattributes, !.github, !.editorconfig, etc), but then I'm free at any point to throw .foo.lang files, or .tmp/.cache dirs, or Claude helpers like .code_analysis.md, or .todos.txt, or whatever in my project without managing the fallout of forgetting to manage the .gitignore. I'm surprised more people don't go this route.

der_gopher•1h ago
I do the same
GranPC•27m ago
Couldn't you put !.gitignore et al in your global config file?
flexagoon•25m ago
I have `playground/` in my ignore config, that way I can just create a playground directory for any project and do stuff in there
caseyw•27m ago
I don’t ignore by default, but only stage the items I explicitly want.

I can’t tell you how many times I’ve been pairing with someone when they just say “git add .”, I’m always confused by that choice.

I get it, but I’ve seen more problems arise from adding all than being consistently selective. To each their own.

etbebl•10m ago
I use "git add ." (or rather -A), but I will always do a "git status" first to make sure I'm not doing something silly. Of course you still have to be careful about subdirectories, which is why I usually also do a "git status" again before committing.
Lindby•27m ago
`git add -p` is your friend to avoid adding unintended files/changes.
flexagoon•27m ago
> other junk (CLAUDE.md for example) that shouldn’t be in your repository

How is CLAUDE.md/AGENTS.md "junk that shouldn't be in your repository"? If you're using agents for a project and have some project-specific rules for them, why would you want other people using agents in your repository to not have access to those rules and produce worse code?

outloudvi•26m ago
If people want to apply this mechanism, it shall be not much of a hassle for writers of most (modern) programming languages, as they mostly have some `src/` directory (maybe also some `tests/`) that contains all source codes for a quick `git add`.

For Golang users, I dunno...

rcfox•16m ago
This seems like bad advice. I've very rarely committed extra files by accident, but I would 100% forget to unignore files I meant to commit.

If you're doing an initial setup step to gitignore everything, why not just do an initial setup step to gitignore the usual files? Make a template that you copy into all of your repos.

gruez•11m ago
>This seems like bad advice. I've very rarely committed extra files by accident, [...]

You clearly haven't seen the people who are lazy and so just do `git add . && git commit -m ... && git push -f origin` every time.

rcfox•9m ago
I'm not convinced people acting on muscle memory would remember to unignore the files either. They're going to lose work or have giant "oops, I forgot to commit these files" commits.
cush•5m ago
Now walk through exactly what would happen when those lazy people follow this approach…

You see the issue right?

vehemenz•12m ago
It's a neat approach for the current problem of untracked dotfile accumulation.

The real problem is that the entire reason to use git at this point is because of the conventions established around it. There are better VCSes and methods now, but they "break" the conventions of git (which honestly sucks, but it is what it is).

queezey•8m ago
This approach is actually ideal for Docker ignore files to reduce bloat of your Docker images.

The "$60 Gaming PC" – AMD BC-250 (2025)

https://devquasar.com/hardware/the-60-gaming-pc-amd-bc-250/
62•networked•1h ago•21 comments

There's No Limit to How Bad Code Can Get

https://zachkehs.com/blog/theres_no_limit_to_how_bad_code_can_get/
30•zkehs•49m ago•11 comments

Global warming will exceed 1.5-degree limit, UN says

https://www.pbs.org/newshour/science/global-warming-will-exceed-1-5-degree-limit-un-says-in-repor...
99•ijidak•2h ago•54 comments

Actively exploited sandbox RCE in all Chromium versions

https://nvd.nist.gov/vuln/detail/cve-2026-85046
628•negura•17h ago•350 comments

Discovery of a new OpenAI agent message board

https://collusion.wiki/
1860•moultano•1d ago•1421 comments

Nitter has more working instances than before the takedowns

https://codeberg.org/mv12star/shitter/wiki/Instances
396•Cider9986•14h ago•157 comments

.gitignore Everything by Default

https://packagemain.tech/p/gitignore-everything-by-default
15•der_gopher•1h ago•17 comments

Terpstra Keyboard

http://terpstrakeyboard.com/
37•cl3misch•4h ago•13 comments

Formalizing Fermat's Last Theorem

https://www.anthropic.com/research/formalizing-fermats-last-theorem
671•jlebar•20h ago•423 comments

Netherlands pulls gold out of the US for fears of 'geopolitical unrest'

https://www.abc.net.au/news/2026-09-04/why-the-netherlands-moved-its-gold-from-us-and-canada/1071...
194•daniel_iversen•4h ago•120 comments

Pentagon rescinds new testosterone screening policy without explanation

https://arstechnica.com/health/2026/09/pentagon-releases-then-quickly-removes-testosterone-screen...
85•ndsipa_pomu•1h ago•74 comments

Statichost.eu – European static site hosting

https://www.statichost.eu/
366•p4bl0•18h ago•167 comments

Claude's new system prompt doesn't want to reproduce song lyrics

https://simonwillison.net/2026/Sep/2/claudes-new-system-prompt/
21•Bluestein•4h ago•8 comments

AI handles incidents, engineers lose touch with their systems

https://www.sylvainkalache.com/blog/ai-handles-incidents-engineers-lose-touch-with-their-systems
258•sylvainkalache•7h ago•223 comments

A Million Falcons Went Missing. Here’s How They Were Found

https://www.nationalgeographic.com/animals/article/falcons-migration-angola-falcopolis
10•bryanrasmussen•2d ago•1 comments

Can AI design circuit boards yet?

https://eebench.org/blog/can-ai-design-circuit-boards-yet/
302•iopapa•19h ago•180 comments

Git hosting that never leaves Europe

https://pushin.eu
162•sevenseacat•8h ago•92 comments

Kale: A Transformation-Safe Spreadsheet System

https://arxiv.org/abs/2608.26345
38•zdw•4d ago•13 comments

Meet the Ig Nobel Prize Winners

https://arstechnica.com/science/2026/09/meet-the-2026-ig-nobel-prize-winners/
18•mkl•1h ago•2 comments

A bizarre Commodore 64 peripheral, a mime, and some pretty bad ads

https://buttondown.com/suchbadtechads/archive/spartan-and-the-mime/
9•rfarley04•2h ago•1 comments

GPT-6 Astra on OpenRouter

https://openrouter.ai/openai/gpt-6-astra
263•Topfi•17h ago•178 comments

Portal by Spotify cut my Claude Code token usage by 90%

https://engineering.atspotify.com/2026/9/portal-by-spotify-cut-my-claude-code-token-usage-by-90
185•cebert•15h ago•97 comments

Ask HN: Resources to get good at soldering?

173•tosmatos•3d ago•103 comments

Shutting down our public encrypted DNS

https://mullvad.net/en/blog/shutting-down-our-public-encrypted-dns-servers-and-sponsoring-quad9-i...
389•mywacaday•20h ago•182 comments

Show HN: Open-Source eInk Bike Computer

https://opentrailpaper.com
333•stingrae•21h ago•110 comments

Git Submodules as a Package Manager

https://nesbitt.io/2026/09/01/git-submodules-as-a-package-manager.html
72•ErenayDev•4d ago•14 comments

IBM Bob

https://bob.ibm.com/
301•artpar•1d ago•310 comments

Can guitar frets perform multiplication?

https://www.charlespetzold.com/blog/2026/09/Can-Guitar-Frets-Perform-Multiplication.html
105•wibbily•16h ago•29 comments

Pointing at the error: compiler-style diagnostics in uutils coreutils

https://uutils.org/blog/2026-08-error-diagnostics/
36•ingve•3d ago•4 comments

Fermat's Last Theorem in Lean 4

https://github.com/anthropics/fermats-last-theorem
131•aaraujo002•20h ago•26 comments