r/ProgrammerHumor • • Oct 10 '26

Meme noWayLol

Post image
11k Upvotes

118 comments sorted by

View all comments

1.2k

u/eanat Oct 10 '26

it's completely legitimate way to use gitignore, but I'd recommend to use .git/info/exclude instead of gitignore for this purpose.

364

u/fugogugo Oct 10 '26

any reason to exclude gitignore?

649

u/Successful-Active-21 Oct 10 '26

when everyone wants their own gitignore?

501

u/Blood_and_Wine Oct 10 '26 • Mindblown

My gitignore is better than yours gitignore

242

u/Abject-Kitchen3198 Oct 10 '26

My coworkers suggested I add * to mine and praised it as the best gitignore ever. Stopped all PR comments.

114

u/git_push_origin_prod Oct 10 '26

The best code, is no code at all

54

u/DOTS_EVERYWHERE Oct 10 '26

0 test failures everytime. Also speeds up deployments significantly.

27

u/Abject-Kitchen3198 Oct 10 '26

CEO saw my impressively improved metrics and I got a promotion.

12

u/polikles Oct 11 '26

*CEO saw my impressively improved metrics and got himself a bonus

→ More replies (3)

26

u/fugogugo Oct 10 '26

my gitignore is longer than your gitignore

13

u/git_push_origin_prod Oct 10 '26

You dropped these ..

18

u/ExtraWorldliness6916 Oct 10 '26

Mines so good, it's not here, you can't read it!

→ More replies (4)

39

u/No-Article-Particle Oct 10 '26

But one gitignore can't handle the 30-odd files that everyone wants to ignore... I never understood the "PR rejected, just ignore .swp files locally" tbh.

21

u/Loading_M_ Oct 10 '26

Yes and no. Git actually has a system wide gitignore you can setup to globally ignore files across your whole system. I personally take notes in a notes.md file, so I have a global ignore for it. I don't have you set it up for each repo, and it doesn't pollute the repo's gitignore. If your editor of choice creates temp files or stores project specific configuration in the project directory (e.g. .vscode, etc), they should also be in your global gitignore.

→ More replies (1)

14

u/NewLlama Oct 10 '26

Because it invites unbounded shared configuration for local workflows.

11

u/OhioGoblin43 Oct 10 '26 edited Oct 10 '26

Everyone hates me for being the repo gestapo but the only issues people have with setting up is when they've skipped steps in the doc. No one can be bothered to address that either though so it'll be me automating that too soon.

→ More replies (2)
→ More replies (1)

39

u/eclect0 Oct 10 '26

When would that be necessary?

Let me rephrase

In what situation could all contributors be trusted to maintain their own personal gitignore without any issues?

16

u/phl23 Oct 10 '26

If someone likes drama in his team, I guess.

→ More replies (4)

5

u/subone Oct 10 '26

This isn't real, right? Git already supports ignores in the global config in your profile folder. I do this sometimes so I can add *.otr.md files to track detailed personal notes on individual project files and directories.

5

u/NerdyMcNerderson Oct 10 '26

Which is the exact use case for .git/info/exclude

→ More replies (3)

22

u/Y0nix Oct 10 '26 edited Oct 10 '26

Some very specific CI pipelines. Or if using a big monorepo with hundreds of coworkers working on it.

You use that feature to ignore the main gitignore file and push the one you want into the pipeline. Because you may want to use a file that is normally being ignored for dev or commit to build your soft.

Like having a .env file for each purpose, but you don't wanna mess up with the way your builder is working for that one exception. And it's allowing everyone to have some flexibility to manage their own ignore rules.

23

u/SundaySloth_ Oct 11 '26

To hide that your gitignore is hiding AGENTS.md, CLAUDE.md, etcetera

→ More replies (4)

12

u/outwest88 Oct 10 '26

What’s it for? If you just want to temporarily disable gitignore or something?

26

u/thatashu Oct 10 '26

You want to gitignore something just for you. You don't want to add it to gitignore file.

For e.g. you have file context.md but much of it's is claude yap. You don't want everyone to see your claude written to file. But you want your clause to read it. So you exclude it.

→ More replies (2)
→ More replies (1)