June 18, 2026
Ignore-gate hits version control
.gitignore Isn't the Only Way to Ignore Files in Git
Git users are fighting over the 'secret' file-hiding tricks everyone forgot existed
TLDR: Git can hide files in three places, not just the usual `.gitignore`, which matters because some lists are private to you and won’t affect coworkers. The comments split between “everyone already knew this” snark, power users showing off secret habits, and one charmingly simple vote for keeping things basic.
A seemingly innocent tip about hiding files in Git — the tool developers use to track code changes — turned into a mini comment-section cage match. The big reveal? There isn’t just one ignore list. Besides the famous .gitignore, there’s also a private per-project hideaway in .git/info/exclude, plus a machine-wide ignore list in ~/.config/git/ignore. Translation for normal humans: you can stop certain files from showing up without forcing your whole team to care about your personal clutter.
And oh, the reactions. One camp basically yelled, “This is old news!” with one commenter dismissing the post as a “very low-effort regurgitation” of the official Git docs. Ouch. But others rushed in like proud underground experts, especially fans of .git/info/exclude, saying they use it “the ever living hell” out of it for local scripts and one-off files coworkers would never need.
Then came the lifestyle discourse: should people use the default ~/.config/git/ignore, or make a custom file like .gitignore_global? One commenter gave full Marie Kondo energy, arguing the proper place is ~/.config because it keeps the home folder less messy. Meanwhile, the funniest flex of the thread came from the person who globally ignores a folder called attic — a junk drawer for every project. Honestly? That’s not just a tip, that’s a personality.
The least dramatic reply was also somehow the funniest: “I still like using gitignore very much.” In a thread full of secret pathways and power-user pride, that was the digital equivalent of ordering plain toast at a food festival.
Key Points
- •The article says Git supports ignoring files through three files: `.gitignore`, `.git/info/exclude`, and `~/.config/git/ignore`.
- •`.gitignore` is described as the standard ignore file that is checked into the repository and shared with collaborators.
- •`.git/info/exclude` is described as a repository-local ignore file that is not checked into version control.
- •`~/.config/git/ignore` is presented as a machine-wide global ignore file for files that should be ignored across all repositories on a computer.
- •The article recommends `git check-ignore -v` to determine which ignore rule is affecting a file and notes that the command produces no output when no ignore rule matches.