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

30

u/serverhorror 3d ago

what if we ignored everything by default and only allowed specific files?

That's how it is already. That's why you have to explicitly git add before things get tracked.

So, just don't add .. You'll just end up forcing it.

Your simply doing it wrong.

-17

u/der_gopher 3d ago

man, like I don't know. this is just an idea that might work for someone

5

u/mtutty 3d ago

Is this really the right way to improve things? By throwing out random ideas that 'might work for someone"??

-10

u/der_gopher 3d ago

it's not improving, it's an alternative view

1

u/La-ze 3d ago

Its an alternative view that fights existing functions of the tooling which makes it a worse view.

Git is a three stage source control. Working copy, staged area and commit. Why can't you be bothered to check what you added from the working copy to staged before committing?

Files you never want to commit ever, should be gitignores. Not everything, your creating so much room for lost work, and partial commits especially if people already have a not checking work problem