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

Re: .gitignore for large files?

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jul 24, 2011, 02:59 UTC
Message-ID
<CACsJy8C=ks1_TdQdNi4Wq8OCSAON9rhJ88zAp1kDZy3fBg2pmQ@mail.gmail.com>
In-Reply-To
<B27BF8C0758741A68E1631A7308E17C6@PhilipOakley>
On Sun, Jul 24, 2011 at 3:00 AM, Philip Oakley <philipoakley@iee.org> wrote:
Show 6 quoted lines
> Has there been any discussion in the past on a method for ignoring large
> files via the .gitignore process?
>
> It does appear to be a moderately common problem for folk to accidentally
> commit a large file which bloats their repository and they want rid of it,
> which causes history re-writes and such palaver.

Once they are in, they cannot be ignored. Perhaps commit hooks at server side is a better place?

> Perhaps a simple '>' and '<' option (the latter to cover null or minimal
> files?) with a --warn postfix may be possible. Just an initial thought.
Or you can make use of .gitattributes, more flexible syntax.
> Where would the 'right place' be for me to look at the git code if it was
> beneficial.
In dir.c, add_exlude() does the parsing, excluded_from_list() handles the logic.
-- 
Duy
Previous: Philip OakleyNext: Philip Oakley
Message 2 of 6 in “.gitignore for large files?”
  1. Philip OakleyJul 23, 2011
  2. Nguyen Thai Ngoc DuyJul 24, 2011
  3. Philip OakleyJul 25, 2011
  4. Nguyen Thai Ngoc DuyJul 25, 2011
  5. Junio C HamanoJul 25, 2011
  6. Philip OakleyJul 25, 2011

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.