This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- DESCRIPTION -- | |
If you accidentally commit a huge file, you have a problem. Sure, you can remove it from the working tree and commit, | |
but the file is still reachable from your history and therefore causes every clone to be as huge as the commented | |
binary file. | |
Fixing this can be very ugly, time consuming and might not even work as you wish. Luckily, this script can protect | |
you from committing such monsters in the first place. | |
It looks through the staged files (the ones that are added with the "git add"-command) and checks for their file-size. | |
If they are larger then the given size, the commit is aborted and you get a message telling you what file takes so |