r/programminghumor • • 12d ago

gitignore

Post image
1.8k Upvotes

19 comments sorted by

106

u/Round_Credit_5158 12d ago

So what really happens if you do this?

127

u/akuma-i 12d ago • Mindblown

No one knows what’s inside a black hole

28

u/bigbeanz37 12d ago

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

22

u/realmauer01 12d 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.

10

u/Andrey4ik21pro1 12d ago

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

5

u/SeanyDay 12d ago

What uses do you have in mind?

7

u/Andrey4ik21pro1 12d ago

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

4

u/NoobGamerInRealLife 12d ago

check git exclude  .git/info/exclude

→ More replies (1)

2

u/victormunoz-sec 11d ago

explota el universo

→ More replies (3)

7

u/Altruist479 12d ago

.gitignore

1

u/laconic_hyperbole 10d ago

Potable Hole + Bag of Holding = Fun!