From: Philip Oakley Date: Mon, 25 Jul 2011 06:53:44 GMT Subject: Re: .gitignore for large files? Message-ID: <179943CA8CCC4BEE811E31B2BCC634D1@PhilipOakley> In-Reply-To: Duy, The .git attributes is a good call. I'm thinking that it would be a global flag (i.e. is a max file limit in place at all on this repo), and then a set of limits, initially one for 'text' and one for 'binary' (and possibly a third for anything with an ext diff), and probably use a similar attribute format as used for setting diff attributes and its filters to set a per file type limit [if required] The relevant function names gives me a place to start.... Philip ----- Original Message ----- From: "Nguyen Thai Ngoc Duy" To: "Philip Oakley" Cc: "Git List" Sent: Sunday, July 24, 2011 3:59 AM Subject: Re: .gitignore for large files? > On Sun, Jul 24, 2011 at 3:00 AM, Philip Oakley > wrote: >> 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 > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > > > ----- > No virus found in this message. > Checked by AVG - www.avg.com > Version: 10.0.1390 / Virus Database: 1518/3783 - Release Date: 07/23/11 >