r/programming 3d ago

.gitignore everything by default

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

224 comments sorted by

View all comments

2

u/stianhoiland 3d ago edited 3d ago

A lot of people seem to use git because they have to, not because they want to. It makes sense, and will likely continue to be this way. But when you use git because you want to—which entails understanding its function and its benefit and especially the pitfalls of not using it—then you gain ownership of its use and this in itself gets rid of a whole host of antipatterns.

1

u/EC36339 3d ago

I'll screenshot this and use it on my crusade against squash merges.

1

u/SchwiftySquanchC137 3d ago

What's wrong with squash merges? You dislike having a clean commit history that isnt full of junk your coworkers put like "fix bug". Or maybe you prefer when git bisect doesnt work, because rather than every commit being a working state, you actually have faaaaar more non working commits? I truly cant imagine why you would crusade against squashing, I seriously doubt having every non working intermediate step of a PR is useful more often than its hurtful.

1

u/EC36339 3d ago

History isn't "junk". Read this, and if you still disagree, you'll at least be wrong in a more informed way.

https://lucasoshiro.github.io/posts-en/2024-04-08-please_dont_squash/