‹ BackHN Continuity

Thread

Two Git ignore files nobody told me about

95 points · 66 comments · faithraven

  1. cxr · · focus · HN ↗

    [dead]

    1. Phemist · · focus · HN ↗
      So all your fellow devs do `ln -s contrib/gitignore ./git/info/exclude`?

      Also you can do `git status --ignored` and it will list all files changed, even if ignored. If that is really your main issue.

      1. cxr · · focus · HN ↗
        > So all your fellow devs do `ln -s contrib/gitignore ./git/info/exclude`?

        I don't know you think that will do or how symlinks work, but it won't lead to anything relevant to this discussion. (To answer your question: no.)

        1. Phemist · · focus · HN ↗
          The symlink creates what is effectively a version-controlled gitignore. It would be the obvious way of getting around your arbitrary restriction (and how do you know they are not doing this, the symlink is not checked in).

          My comment and the other replies show you how to use git to check and clean the files of the much maligned horked build script. These will work regardless of the gitignore contents.

          But then again, pretty sure you are just having a laugh at our expense by taking this ridiculous position.

          1. cxr · · focus · HN ↗
            I know they aren't because:

            > The symlink creates what is effectively a version-controlled gitignore

            No, it doesn't—like I already said. The ln(1) invocation you wrote is not going to work. As written, it contains two glaring errors obvious on sight to anyone who actually has enough experience with the particulars of /bin/ln and Git and how repos get populated with a default .git/info/exclude.

            > My comment and the other replies show you how to use git

            Oh, gee, thanks!

            1. Phemist · · focus · HN ↗
              Yeah I guess there are things to nitpick about the ln. And ofc the comments are more for onlookers, to contextualize the poor decision making shown in banning .gitignore suggested by the original post. Obviously this is some emotional topic for you, seeing all the snarky and defensive responses (this particular one was edited and originally had ... more than just Gee, thanks!), so I will leave it at that.
              1. cxr · · focus · HN ↗
                Boy, those pesky emotions! Surely that's the culprit here, and not self-assured HN commenters showing up to hand out /r/confidentlyincorrect-tier advice that still wouldn't address anyone's problem even if it did work.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.