On Thursday, May 7, 2015 at 10:45:29 PM UTC+2, Roger Mendes wrote: > > Allow .gitignore to support setting a file size limit so that all files > over a certain size will by automatically ignored when performing git add, > commit -a...; >
Small note, there is no parameter to git-commit that will automatically add all untracked files. > Exclusions to this size limit for files can be allowed by specifying > exceptions '!' syntax that already exists. It probably should be considered > to have a default limit already built into git of say 100MB (used by > github) which can be changed in the .gitignore file. > > This would avoid accidental commits of large files which are known to be > poorly supported. > > This seems like a fairly simple feature to add, I'm not sure why no one > has done this or thought of it given the number of complaints, questions... > with large file handling. > > We can ignore by file name attribute, why not by file size? > > Yes, I know I can add pre-commit scripts... to workaround this issue, but > there should be a better way (or maybe I'm missing something?). > The use-case is somewhat exotic. I think most people do some fair share of thinking before tracking new files, and the mental cost of manually leaving out or ignoring "large" files is not that high. If you do set some arbitrary limit on what constitutes a "large file which should not be tracked", you're trying to automate something which is not so easy to automate. I mean, 5 years from now, storage (SSD), network-speed and memory will be a lot cheaper, and Git will make many performance enhancements, so maybe by then it will perfectly OK to check in 100 MB files, or even GB files. You'd have to review and maintain these ".gitignore" size entries regularly. If you still can justify why this would be a valuable feature for a noteworthy amount of Git users, the place to suggest new features is the main Git mailing list: https://gist.github.com/tfnico/4441562 -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.