r/programminghumor • • 2d ago

gitignore

Post image
1.2k Upvotes

19 comments sorted by

76

u/Round_Credit_5158 2d ago

So what really happens if you do this?

95

u/akuma-i 2d ago • Mindblown

No one knows what’s inside a black hole

22

u/bigbeanz37 2d ago

It would be the same as making any other change to .gitignore and not committing/pushing it

18

u/realmauer01 2d ago

Git still sees and can read gitignored files, they just dont get added to the worktree

So you just dont commit this gitignore. I tend to use to add * to gitignores in folders to basically hide that entire folder if i dont want to have that folders name in the toplevel gitignore.

9

u/Andrey4ik21pro1 2d ago

That means I can use gitignore features, without pushing gitignore file? So this is very useful

4

u/SeanyDay 1d ago

What uses do you have in mind?

5

u/Andrey4ik21pro1 1d ago

Maybe create "trash" folder with some unnecessary code, and gitignore it with glob (*)

4

u/NoobGamerInRealLife 1d ago

check git exclude  .git/info/exclude

1

u/Andrey4ik21pro1 1d ago

I will use this, thanks

1

u/Altruist479 1d ago

.gitignore

1

u/Appropriate_Unit3474 1d ago

It has to run at least once

1

u/Opening-Tonight8669 1d ago

both cancel out maybe?

1

u/victormunoz-sec 17h ago

explota el universo

5

u/Altruist479 1d ago

.gitignore

1

u/laconic_hyperbole 1h ago

Potable Hole + Bag of Holding = Fun!