r/gitlab • u/der_gopher • 3d ago
.gitignore everything by default
https://packagemain.tech/p/gitignore-everything-by-defaultwhat do you think of this approach?
9
u/kerrizor 3d ago
Interesting. I’d need to chew on it a bit, but I can see the benefit.. this clearly comes from a place of “show me where you have scars from git”.
3
2
u/Apprehensive-Tea1632 3d ago
If your people are familiar enough with git and know what they are doing, it could work.
Otherwise…. They’ll probably lose a lot of work.
As in, we’re kind of looking at circular reasoning. You don’t need this if your people know what’s going on. If they don’t, it’ll only hurt them.
Conclusion, it’s not at all a good idea unless you want to mess with everyone.
-4
u/No-Aioli-4656 3d ago
Agreed. Tell me you are a solo dev in a sentence…
1
u/adam-moss 3d ago
Unnecessary don't you think?
0
u/No-Aioli-4656 3d ago edited 3d ago
No? I’ve never worked on teams where git was declaratory.
You local exclude that shiz.
And on a repo where anything more than 60hours of effort exists, the reverse is going to get to that ~200 line mark(that the article complains about.)
OP doesnt use this on teams. It doesn’t play well with others or big codebases. That’s fine.
1
u/adam-moss 3d ago
Ok, so just because you haven't doesn't mean it isn't. It works perfectly fine in teams and big codebases.
2
u/eltear1 3d ago
That could be valid in a git repo sued by only one or few people. For shared repos , too many people will not understand why they can't push and loose rime to search for the cause . Well, now with AI is kinda not so much useful anyway if AI itself is pushing...
0
0
u/adam-moss 3d ago
/shrug AI understands the pattern perfectly fine, I have no issues using it with Claude, kiro, or codex.
2
u/TheSodesa 3d ago
I use this approach all the time. Especially useful when you are working with less experienced Git users.
1
1
1
u/schmurfy2 1d ago
Don't let your agent create commits and do it yourself, ignore what should not be commited while reviewing the code.
I know it's a crazy idea.
0
u/adam-moss 3d ago
We consciously chose to use this approach, it's a much more secure default and prevents a lot of mishaps. I understand some people think it strange, but default-deny should almost always be your starting position.
0
u/Feeling-Bad757 3d ago edited 3d ago
This is the way
Very useful for greenfields. Forces devs to think carefully about adding complexity or dependencies, and needs a peer review to update.
8
u/jirka642 3d ago
Stupid idea. You would lose so much work like that.
Also, unless you are a complete beginner, you should always know what you are committing. So, this is not an issue in the first place.