Live data from Hacker News

.gitignore Is Inherently Sisyphean

rgbcu.be

61–68 of 68 posts

Re: .gitignore Is Inherently Sisyphean

#61
post #24
post #5

I think people should be responsible for the litter of their own tools. If their commits have include any litter it should be rejected as they clearly aren't paying attention. The local gitignore is for project specific files.

The fact that toil can be pushed off onto other people (the pushing and feedback and re-review also being additional time and effort) doesn’t change the fact that it’s toil and it’s stupid and wasteful.

No. Wrong take. Wrong location for obligation. This absolute collective toil argument would imply getting these into some kind of default baked into the tools, not something every new project should go out of their way to do something only for the benefit of everyone else but themselves. That is the pushed off work.

Re: .gitignore Is Inherently Sisyphean

#62
post #60
post #58

Earlier quoted context omitted.

that's right but often CI systems are ephemeral or locked down so the logs get cluttered with this noise

That’s fair. They really should revert that nonsense.

  $ git init
  hint: whoa whoa whoa my dude "master" no...

  $ git config --global init.defaultBranch aids_is_gods_punishment_for_depravity
  $ git init
  ok

Re: .gitignore Is Inherently Sisyphean

#63
Or don't have people in your project that add random files or directories, and can't even explain what they are.

I don't use .gitignore files in projects that I control. A few times I've been tripped up by these things ignoring something that should not have been.

I feel that these files should stay local. I don't want your .gitignore any more than I want your .vimrc or whatever. If you maintain a very messy local repo with lots of extraneous files, and find that this file helps you when you're using git, by all means create one for yourself.

Re: .gitignore Is Inherently Sisyphean

#64
post #49
post #22

Earlier quoted context omitted.

I've found that reducing the friction, as much as possible, is the only way to get people to actually contribute. Excluding things like .vscode and .DS_store, which is a common and universal "don't need that in my repo", is a trivial way to reduce the burden for everyone (the goal of software, imo), maintainer included.

> Excluding things like .vscode and .DS_store I’m old and cranky enough to want to believe that excluding contributions from VS Code and macOS users is a trivial way to reduce the maintainer’s burden and improve software quality. That’s completely unfair, of course, and probably false too. edit: s/maybe/probably/

[deleted]

Re: .gitignore Is Inherently Sisyphean

#65
post #43

Earlier quoted context omitted.

Interns and new hires sometimes need a quick chat about actually looking at their changes before asking for a review, but that's about it in my experience. I guess it could be a problem for a project which accepts a large number of public PRs from mostly non-technical or beginner users?

It's not a problem with PRs if you use Squash merge, the developer can make any number of changes to that PR but in the end, only the final version (in this case it doesn't include .DS_Store) will be commited. even the .DS_Store file will not be in the git index

That sacrifices the git history though. It turns the PR into a huge atomic change instead of a series of step-by-step changes that are easy to review.

Re: .gitignore Is Inherently Sisyphean

#66
post #60

Earlier quoted context omitted.

That’s fair. They really should revert that nonsense.

$ git init hint: whoa whoa whoa my dude "master" no... $ git config --global init.defaultBranch aids_is_gods_punishment_for_depravity $ git init ok

my favorite song from team america!

Re: .gitignore Is Inherently Sisyphean

#67

I did not know that it can be used for whitelist (although I probably would have figured it out if I use mainly git for version control, which I don't), although I had not used .gitignore and I used "fossil add" to add the files that I wanted instead, which is also a kind of whitelist. I did think the blacklist for this purpose was a bad idea anyways, before I saw this, so I used whitelist anyways already. (However,…

Fossil by default ignores files and directories starting with a dot. So, even of you explicitly add a directory, any files or directories starting with a dot inside it gets skipped.

Normally I think it is useful to ignore them in that case. Nevertheless you can (and I have done) explicitly added file names even if the directory name starts with a dot, such as ".fossil-settings/encoding-glob" and ".github/workflows/auto-assignment.yml".

Re: .gitignore Is Inherently Sisyphean

#68

Earlier quoted context omitted.

Fossil by default ignores files and directories starting with a dot. So, even of you explicitly add a directory, any files or directories starting with a dot inside it gets skipped.

Normally I think it is useful to ignore them in that case. Nevertheless you can (and I have done) explicitly added file names even if the directory name starts with a dot, such as ".fossil-settings/encoding-glob" and ".github/workflows/auto-assignment.yml".

We do the same thing when specific files need to be added even though they are either dot files or within dot directories.
Post reply on HN