‹ BackHN Continuity

Thread

Two Git ignore files nobody told me about

95 points · 66 comments · faithraven

  1. cxr · · focus · HN ↗

    [dead]

    1. athorax · · focus · HN ↗
      This is one of the strangest opinions I've seen in awhile. Your complaint seems like it should be pointed at projects not having a working "clean" make target.

      Also:

        git status --ignored
        git clean -ndX # preview what would be removed
        git clean -fdX # actually delete the files (warning: destructive)
      1. cxr · · focus · HN ↗
        Yeah, I don't know why you'd think, having taken care to add stuff to .git/info/exclude that doesn't belong in any commit that will make its way upstream (but nonetheless might be—and probably is—important work, maybe even the product of some non-trivial effort), that what I'd want is for it to be wiped out.

        And `rm ./.gitignore` will, predictably, leave the tree without a ./.gitignore (i.e., the desired state) whereas `git status --ignore`, uh, won't.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.