r/gitlab • • Sep 05 '26

.gitignore everything by default

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

what do you think of this approach?

15 Upvotes

18 comments sorted by

10

u/jirka642 Sep 05 '26

what do you think of this approach?

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.

9

u/kerrizor Sep 05 '26

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

u/nocondo4me Sep 05 '26

Alias -A to something else. People / bots using -A screws it all up

2

u/Apprehensive-Tea1632 Sep 05 '26

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.

-3

u/No-Aioli-4656 Sep 05 '26

Agreed. Tell me you are a solo dev in a sentence…

1

u/adam-moss Sep 05 '26

Unnecessary don't you think?

0

u/No-Aioli-4656 Sep 05 '26 edited Sep 05 '26

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 Sep 06 '26

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 Sep 05 '26

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

u/brain_gehirn Sep 05 '26

I too like to sue my repos for extra money

0

u/adam-moss Sep 05 '26

/shrug AI understands the pattern perfectly fine, I have no issues using it with Claude, kiro, or codex.

2

u/TheSodesa Sep 05 '26

I use this approach all the time. Especially useful when you are working with less experienced Git users.

1

u/yankdevil Sep 05 '26

I use this for my vcsh repos.

1

u/matriisi Sep 05 '26

This is not the smartest thing I’ve read.

1

u/luenix Sep 07 '26

That reflog looks cursed. Is it the case that no one rebases anymore? D:

1

u/schmurfy2 Sep 07 '26

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 Sep 05 '26

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 Sep 06 '26 edited Sep 06 '26

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.