Reputation: 394
I have a commit, and I am trying to push it. I get this response
Git LFS: (0 of 9 files, 9 skipped) 0 B / 3.24 GB, 3.24 GB skipped
[422] Size must be less than 2147483648
[0ee4f2bc4d42d98ea0e7b5aeba2762c7482f3bcf00739d40b922babe8061820b] Size must be less than 2147483648
error: failed to push some refs to ...
What files are these?
How can I find and remove them from my commit so I can push all these files up?
Upvotes: 9
Views: 6592
Reputation: 1498
On macOS, I had to use a different command than what @MarcusMüller suggested, because the stat
command is slightly different:
-f
instead of -c
%z
instead of %s
%N
instead of %n
So the command is as follows:
git ls-files -z | xargs -0 stat -f '%z %n' | sort -n
Upvotes: 0
Reputation: 36482
A simple
git ls-files
will give you a listing of files currently managed by git.
With a bit of pipe magic, the file over size limit get's pretty easy to spot
git ls-files -z | xargs -0 stat -c '%s %n' | sort -n
will give you an ascendingly sorted list of file sizes and corresponding files.
Upvotes: 16