git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Default exclude rules for Git

From
Avery Pennarun <apenwarr@gmail.com>
Date
Sep 19, 2008, 16:42 UTC
Message-ID
<32541b130809190942j10dfde82q15726772a7657520@mail.gmail.com>
In-Reply-To
<20080919163311.GH10544@machine.or.cz>
On Fri, Sep 19, 2008 at 12:33 PM, Petr Baudis <pasky@suse.cz> wrote:
Show 5 quoted lines
> Yes, but the idea here is to give both the projects and the users
> sensible default to work on, in case of users even one that might change
> system to system based on tools behavior. It is that VAST MAJORITY of
> projects won't care about object or (most kinds of) hidden files, so to
> me it makes sense to make people opt out instead of opt in.

The problem here is that the cost of a false positive (ie. too much ignored) is much greater than the cost of a false negative (ie. too little ignored).

In the very worst case, if too few files are ignored and a developer is paying no attention at all, then a *.o or *~ file gets committed; you can just delete it again. But if too *many* files are ignored, you can work on your private branch for weeks at a time, thinking you're keeping regular snapshots, and actually all your commits are useless because an important file was never versioned.

I never, ever want to end up in the latter situation, so even though I start virtually every git project by putting "*.[oa]" and "*~" in my .gitignore, I'm glad it's *me* doing that and not somebody else.

Have fun,
Avery
Previous: Petr BaudisNext: Kirill Smelkov
Message 20 of 22 in “A couple of TopGit tweaks”
  1. Kirill SmelkovSep 18, 2008
  2. .gitignore += vim swap filesKirill Smelkov, Sep 18, 2008
  3. martin f krafftSep 18, 2008
  4. Kirill SmelkovSep 18, 2008
  5. Bert WesargSep 18, 2008
  6. Kirill SmelkovSep 18, 2008
  7. Bert WesargSep 18, 2008
  8. Kirill SmelkovSep 18, 2008
  9. martin f krafftSep 18, 2008
  10. Daniel BarkalowSep 18, 2008
  11. Kirill SmelkovSep 19, 2008
  12. Bert WesargSep 19, 2008
  13. Kirill SmelkovSep 19, 2008
  14. Andreas EricssonSep 19, 2008
  15. Kirill SmelkovSep 19, 2008
  16. Bert WesargSep 19, 2008
  17. Default exclude rules for GitPetr Baudis, Sep 19, 2008
  18. Junio C HamanoSep 19, 2008
  19. Petr BaudisSep 19, 2008
  20. Avery PennarunSep 19, 2008
  21. tg help: <something>: improve readabilityKirill Smelkov, Sep 18, 2008
  22. tg import: fix + make more robustKirill Smelkov, Sep 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.