1

I've been working on a site's theme that consists only of a few .scss and .php files. I've been pushing my work up to Github with git.

Today, as with any other day, I made some changes and went push my files up but I noticed git was pushing up megabytes worth of data, not the usual kilobytes.

Of course I checked the commit and there's nothing special there - just 3 .scss files worth maybe 10kb all up.

I ran git diff --stat --cached origin/master and, again, nothing there that could be megabytes worth of data.

I checked my local and the remote repo - still nothing unusual.

Would anyone know how I could check what's causing the commit to be so large?

MeltingDog
  • 14,310
  • 43
  • 165
  • 295
  • Try `git ls-tree -r -l HEAD`. The 4th column is the size of a blob. If a size is abnormally large, the corresponding blob may be the cause. – ElpieKay May 26 '19 at 03:17
  • Thanks. That's a good thing to know. Unfortunately, it still showed no large files. – MeltingDog May 26 '19 at 23:27

1 Answers1

0

I generally go with this question, and use:

git rev-list --objects --all|git cat-file --batch-check="%(objecttype) %(objectname) %(objectsize) %(rest)"| \
  sed -n "s/^blob //p"| \
  sort --numeric-sort --key=2 | \
  grep -E ".* [[:digit:]]{6,}"

That will list only 100KB and more objects.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250