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