I fairly regularly attempt to add/commit a file above 100Mb accidentally, then scramble to try and remember how to backtrack these errors. Is there any way to place a safeguard that just has the effect of skipping git add
for files that are too large?
Asked
Active
Viewed 947 times
0

Austin
- 6,921
- 12
- 73
- 138
-
1You could add a pre-commit hook that rejects big files. Not exactly ignored, but maybe good enough for your problem. – rodrigo Jul 25 '19 at 22:23
-
https://stackoverflow.com/search?q=%5Bgitignore%5D+size – phd Jul 25 '19 at 23:09
1 Answers
0
You can typically gitignore only filenames, file patterns or folders - ignoring based on file sizes is not an available function afaik

SPR
- 85
- 4