r/ProgrammerHumor • • Oct 10 '26

Meme noWayLol

Post image
11k Upvotes

118 comments sorted by

View all comments

400

u/NamelessJu Oct 10 '26

the gitignore paradox

it's being ignored by itself, as such it doesn't know to ignore itself anymore, so it looks inside just to ignore itself again, and so on...

(I know that's not how it actually works pls don't crucify me!)

154

u/Successful-Active-21 Oct 10 '26

git knows what to ignore by knowning what not to ignore.

56

u/No-Admin1684 Oct 10 '26

By subtracting what it's ignoring from what it's not ignoring, or what it's not ignoring from what it's ignoring (whichever is greater), it obtains a difference, or deviation.

8

u/3BlindMice1 Oct 10 '26

Careful, that's how you end up with flowerpots and whales falling from the sky

1

u/zymurgtechnician Oct 12 '26

Oh no, not again.

12

u/aschen15 Oct 10 '26

The missile knows where it is at all times. It knows this because it knows where it isn't. By subtracting where it is from where it isn't, or where it isn't from where it is.

13

u/edwardbnd_99 Oct 10 '26

Yeah it's an interesting variant of the barber paradox

34

u/TeraFlint Oct 10 '26

Nothing paradoxial about that.

It just means that we don't want to sync the local .gitignore onto the server. It still uses said local .gitignore to do the actual selection.

44

u/NamelessJu Oct 10 '26

apparently you put the last sentence of my message into your .gitignore

11

u/No-Finance7526 Oct 10 '26

.brainignore

8

u/rosuav Oct 10 '26

It's also worth noting that an ignored file won't be excluded from the repo - it's just harder to accidentally commit it. I've had repos that gitignore "*" and then explicitly add the small number of files that I actually want to track.