Live data from Hacker News

Stop Using Git Ignore

eddiejaoude.substack.com

1–10 of 72 posts

Re: Stop Using Git Ignore

#3
You'd still need a repository .gitignore, more-so if you're not working in a professional development shop (i.e., SMB/enterprise IT) or open source project.

There don't seem to be any downsides to a long .gitignore. Who cares if it is 100 or 1000 lines?

Kind of pointless, in my view. I think a user-global .gitignore is fine to have to make sure you don't make mistakes for net-new projects or projects where someone forgot to add your exclusions, but otherwise, you're going to need both if you choose to use a user-global.

Re: Stop Using Git Ignore

#4

You'd still need a repository .gitignore, more-so if you're not working in a professional development shop (i.e., SMB/enterprise IT) or open source project. There don't seem to be any downsides to a long .gitignore. Who cares if it is 100 or 1000 lines? Kind of pointless, in my view. I think a user-global .gitignore is fine to have to make sure you don't make mistakes for net-new projects or projects where someone fo…

yes we still need the repo git ignore for specific items for the repo

it was more about stop using the repo git ignore for everything, rather than not use it at all

Re: Stop Using Git Ignore

#5

You'd still need a repository .gitignore, more-so if you're not working in a professional development shop (i.e., SMB/enterprise IT) or open source project. There don't seem to be any downsides to a long .gitignore. Who cares if it is 100 or 1000 lines? Kind of pointless, in my view. I think a user-global .gitignore is fine to have to make sure you don't make mistakes for net-new projects or projects where someone fo…

yes we still need the repo git ignore for specific items for the repo it was more about stop using the repo git ignore for everything, rather than not use it at all

Yeah, people putting MacOS-specific files that have no relation to the codebase in the .gitignore should stop.

Re: Stop Using Git Ignore

#7

Earlier quoted context omitted.

yes we still need the repo git ignore for specific items for the repo it was more about stop using the repo git ignore for everything, rather than not use it at all

Yeah, people putting MacOS-specific files that have no relation to the codebase in the .gitignore should stop.

yes exactly! then we end up with every IDE, operating system and dev tools (which is a lot)

Re: Stop Using Git Ignore

#8

Disagree. Many projects may want to commit IDE files. Ignoring them globally is simply wrong.

oh wow, really! why? sounds like a horrible project, imagine those git conflicts

can you elaborate on why they would want to commit IDE generated files? I have only seen this in legacy projects

what happens if people want to use different IDEs?

Re: Stop Using Git Ignore

#9
Problems listed in the article:

> Everyone uses different operating systems, IDEs and dev tools.

How is this related to .gitignore?

> This list will only keep growing, it will never end

Where's the problem? A random Facebook's repo has its gitignore file weigh 2KB[0]. Is this a problem?

> Is the “.gitignore” file competing with the “README.md” for the most updated file in the git repo? I hope not

Again, why is this a bad thing?

The author just wanted to rant about something but didn't know about what

*[0] https://github.com/facebook/facebook-ios-sdk/blob/main/.giti...

Re: Stop Using Git Ignore

#10
Being honest, I dislike the tone of this sort of clickbaity rephrasing of the article title. The actual title is "You must use your Global Git Ignore!" which is completely true; the nuanced observation from the article "Using the git ignore feature is great but it has limitations, which is why I think this file is overused and often incorrectly" is a worthwhile hook, and presented thoughtfully.

The title "Stop Using Git Ignore", which the author of the blog post chose for this submission, doesn't represent his actual article well, though it probably gets more upvotes on Hacker News. I wish he'd presented the article more accurately, as it's a worthwhile observation that, for example, we probably have so many .DS_Store files and .vscode/.idea directories that defining them once will save us some hassle.

Post reply on HN