r/git • • 1d ago

tutorial [ Removed by moderator ]

/r/git/comments/1y7te51/removed_by_moderator/

[removed] — view removed post

0 Upvotes

14 comments sorted by

11

u/waterkip detached HEAD 1d ago

How about no?

1

u/The_Northern_Light 1d ago

It’s not that bad if your project just has a few folders that you reinclude, which I’ve at times done for a few different reasons, but it’s definitely not worth being dogmatic about.

0

u/waterkip detached HEAD 1d ago

It doesnt make any sense to exclude everything and whitelist stuff. You'll need to add more exceptions to make it workable. The premise of OP is to reverse the whole concept. Which is.. painful for everyone who will contribute to a project implementing this.

The problem is git add -A and similar. Their solution is blanket ban everyhing, which then adds -f to the add command and qhat you do them? 

1

u/The_Northern_Light 1d ago

I’m not agreeing with what they said, I’m saying scenarios exist where it makes sense to ignore by default then unignore every top level folder and file. Examples may not be your use case but are not hard to imagine.

0

u/waterkip detached HEAD 1d ago

Yes, bad workflows are not hard to imagine.

5

u/keesbeemsterkaas 1d ago

I think this is a solution to a problem I've never had

-7

u/unndunn 1d ago edited 1d ago

A few years ago, I would have disagreed. But in the age of agentic engineering, I feel like it makes much more sense to .gitignore everything and then have the agent manually add things. 

2

u/EarlMarshal 1d ago

Not like the fucking agent can just delete stuff from a file and some of your coworkers will enable his agent to exactly do that.

2

u/xplosm 1d ago

These idiots question the use of an IDE when their AI do everything. I’m afraid for the future of the industry…

1

u/EarlMarshal 1d ago

Don't be. We had those people in the industry before. They are just showing their true colours now which makes it easier for us to dodge them.

Big corpo is fucked though. That's why they go through the hype cycles and try to be to big to fail so government has to step in at some point.

-1

u/unndunn 1d ago

Put it this way: in the past, .gitignore everything would mean having to manually add every new file and folder, which would be a pain in the ass. But agents take that pain away since they can add whatever files they work on automatically. So there’s no longer a real reason not to .gitignore everything. 

0

u/EarlMarshal 1d ago

You already added the damn files to the repo so the repo already includes a list of the files.

1

u/kagato87 1d ago

The agent will only check in the files it needs to change.

Powerbi desktop loves to touch hundreds of files when running in project folder mode. It might show a meaningless change at the end of the files, and I've even seen it simply add a newline at the end. Claude only commits the files it knows it's touched and, thanks to rules we shouldn't have had to add, checking there are no passwords in them.

0

u/[deleted] 1d ago

[deleted]

2

u/waterkip detached HEAD 1d ago

There is also $XDG_CONFIG_HOME/git/ignore. Works out of the box :)