I’m new to .gitignore, so there may be better ways to do this, but I’ve been excluding files by file size using:
find . -size +1G | cat >> .gitignore
Obviously you’ll have to run this code frequently if you’re generating a lot of large files.
More Related Contents:
- What are the differences between .gitignore and .gitkeep?
- .gitignore is ignored by Git
- Committing Machine Specific Configuration Files
- Git with large files
- ignoring any ‘bin’ directory on a git project
- Gitignore not working
- How do I ignore files in a directory in Git?
- How to create a .gitignore file
- Should I check in folder “node_modules” to Git when creating a Node.js app on Heroku?
- How do I add files without dots in them (all extension-less files) to the gitignore file?
- .gitignore and “The following untracked working tree files would be overwritten by checkout”
- How do I make Git forget about a file that was tracked, but is now in .gitignore?
- When would you use .git/info/exclude instead of .gitignore to exclude files?
- How to DEFLATE with a command line tool to extract a git object?
- How do .gitignore exclusion rules actually work?
- What is .gitignore?
- How to exclude file only from root folder in Git
- Using .gitignore to ignore everything but specific directories
- Apply .gitignore on an existing repository already tracking large number of files
- What’s the difference between Git ignoring directory and directory/*?
- Why doesn’t Git ignore my specified file?
- git still shows files as modified after adding to .gitignore
- gitignore does not ignore folder
- Git: How to remove file from index without deleting files from any repository
- Git: Ignoring Version-Controlled Files
- Git – Creating a .gitignore file
- Why is git is ignoring files that aren’t in the .gitignore file?
- Definitive retroactive .gitignore (how to make Git completely/retroactively *forget* about a file now in .gitignore)
- Unignore subdirectories of ignored directories in Git
- Can I include other .gitignore file in a .gitignore file? (like #include in c-like languages)