r/programminghumor • • 7d ago

gitignore

Post image
1.8k Upvotes

19 comments sorted by

107

u/Round_Credit_5158 7d ago

So what really happens if you do this?

127

u/akuma-i 7d ago • Mindblown

No one knows what’s inside a black hole

28

u/bigbeanz37 7d ago

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

22

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

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

5

u/SeanyDay 7d ago

What uses do you have in mind?

7

u/Andrey4ik21pro1 7d ago

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

4

u/NoobGamerInRealLife 7d ago

check git exclude  .git/info/exclude

1

u/Andrey4ik21pro1 6d ago

I will use this, thanks

2

u/victormunoz-sec 6d ago

explota el universo

1

u/Altruist479 7d ago

.gitignore

1

u/Appropriate_Unit3474 7d ago

It has to run at least once

1

u/Opening-Tonight8669 6d ago

both cancel out maybe?

7

u/Altruist479 7d ago

.gitignore

1

u/laconic_hyperbole 5d ago

Potable Hole + Bag of Holding = Fun!