Quantcast
Channel: How can I find/identify large commits in Git history? - Stack Overflow
Viewing all articles
Browse latest Browse all 29

Answer by skolima for How to find/identify large commits in git history?

$
0
0

I've found a one-liner solution on ETH Zurich Department of Physics wiki page (close to the end of that page). Just do a git gc to remove stale junk, and then

git rev-list --objects --all \  | grep "$(git verify-pack -v .git/objects/pack/*.idx \           | sort -k 3 -n \           | tail -10 \           | awk '{print$1}')"

will give you the 10 largest files in the repository.

There's also a lazier solution now available, GitExtensions now has a plugin that does this in UI (and handles history rewrites as well).

GitExtensions 'Find large files' dialog


Viewing all articles
Browse latest Browse all 29

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>