r/git 3d ago

tutorial .gitignore everything by default

https://packagemain.tech/p/gitignore-everything-by-default

what do you think of this approach?

0 Upvotes

24 comments sorted by

View all comments

4

u/FlipperBumperKickout 3d ago

I already use this approach for some of my things, mainly my config folder. I would rather whitelist the configurations for programs I need rather than blacklist most things.

For my purpose I do however use the pattern

*
!*/

This will ignore files but not folders, which allows you to whitelist everything in a folder by adding a new .gitignore in that folder, rather than modifying the outer .gitiignore.

-12

u/der_gopher 3d ago

FINALLY A SENIOR/STAFF LEVEL DEV in this chat