Re: Git chokes on large file
- From
Thomas Braun <thomas.braun@virtuell-zuhause.de>
- Date
- May 28, 2014, 15:05 UTC
- Message-ID
- <5385FB56.6020009@virtuell-zuhause.de>
- In-Reply-To
- <201405271647.s4RGlDJc024596@hobgoblin.ariadne.com>
Am 27.05.2014 18:47, schrieb Dale R. Worley:
> Even doing a 'git reset' does not put the repository in a state where > 'git fsck' will complete:
You have to remove the offending commit also from the reflog.
The following snipped creates an offending commit, big_file is 2GB which is too large for git on windows, and later removes it completely so that git fsck passes again.
----------------------------------- git init echo 1 > some_file git add some_file git commit -m "add some_file" git add big_file git commit -m "add big_file" # reports malloc error without the -q flag git log --stat # malloc error git reset HEAD^1 git fsck --full --strict --verbose # fails git reflog expire --expire=now --all # remove all reflog entries git gc --prune=now git fsck --full --strict --verbose # passes -----------------------------------