‹ BackHN Continuity

Thread

Two Git ignore files nobody told me about

95 points · 66 comments · faithraven

  1. 6LLvveMx2koXfwn · · focus · HN ↗
    This is great, and nicely written up in the context of agentic repos etc, but presumably no-one reads the official docs, right: <a href="https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;gitignore" rel="nofollow">https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;gitignore where the multiple ways of ignoring files are clearly stated?
    1. alexpotato · · focus · HN ↗
      There is a tweet doing numbers on Twitter right now which is effectively:

      &quot;Do the reading b&#x2F;c you would be amazed how many people don&#x27;t do the reading&quot;

      1. bigfishrunning · · focus · HN ↗
        So many people treat git commands like magic words, and then are terrified when they mess up their repo (example in this xkcd... <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;1597&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;1597&#x2F;)

        Reading documentation is a superpower

        1. faithraven · · focus · HN ↗
          I&#x27;d wager a small sum that git is the tool most of us learned by accident, some of them fortunate, some less so. Thankfully, this one was the former.
          1. 1718627440 · · focus · HN ↗
            Yeah, but Git is a tool, that in the face of an accident shoves you it&#x27;s manual in the face.
        2. coldpie · · focus · HN ↗
          I&#x27;m definitely the friend in the alt-text of this comic. What do you mean you haven&#x27;t read gitcore-tutorial(7)??
      2. windward · · focus · HN ↗
        Do the reading b&#x2F;c there&#x27;s a machine that has done all the reading so it&#x27;s hard to add value if you maintain the anti-intellectualism of 2010s software dev.
    2. stephbook · · focus · HN ↗
      I have never seen these two files in any git repository I&#x27;ve cloned so far.
      1. fortran77 · · focus · HN ↗
        That’s because, unlike .gitignore, they are not committed.
    3. faithraven · · focus · HN ↗
      Until Claude suggested .git&#x2F;info&#x2F;exclude, it never crossed my mind to question how ignoring worked. A search would have answered it in seconds, but you have to think to ask first. I didn&#x27;t, and I suspect most people don&#x27;t either. Especially with git, which nearly everyone learns by doing; very few of us ever sit down and learn it properly. That&#x27;s why I wrote it up: so a few more people can learn this the way we learn everything else in git, by accident.

      Now that you mention it, I should add a link to those docs in the article. Thanks!

      1. onaclov2000 · · focus · HN ↗
        This is true, using AI to help discover better ways of working with stuff is pretty epic, reading docs are about as exciting as writing docs, esp when you are trying to get something done.
        1. gritzko · · focus · HN ↗
          The motivation fades to make things intuitive.
    4. BeetleB · · focus · HN ↗
      For a lot of tools, people usually read the docs once, and obscure stuff is quickly forgotten.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.