Answer by Karl Henselin for How can I find/identify large commits in Git...
I was trying to find the biggest files in the repo using Windows, and none of the powershell answers worked for me, but I found that git now has this:git lfs migrate info --above=10MBthis way git just...
View ArticleAnswer by milahu for How can I find/identify large commits in Git history?
to get a feeling for the "diff size" of the last commits in the git historygit log --statthis will show the diff size in lines: lines added, lines removed
View ArticleAnswer by Windel for How can I find/identify large commits in Git history?
Use the --analyze feature of git-filter-repo like this:$ cd my-repo-folder$ git-filter-repo --analyze$ less .git/filter-repo/analysis/path-all-sizes.txt
View ArticleAnswer by SvenS for How can I find/identify large commits in Git history?
For Windows, I wrote a Powershell version of this answer:function Get-BiggestBlobs { param ([Parameter(Mandatory)][String]$RepoFolder, [int]$Count = 10) Write-Host ("{0} biggest files:" -f $Count) git...
View ArticleAnswer by Aaron for How can I find/identify large commits in Git history?
Powershell solution for windows git, find the largest files:git ls-tree -r -t -l --full-name HEAD | Where-Object { $_ -match '(.+)\s+(.+)\s+(.+)\s+(\d+)\s+(.*)' } | ForEach-Object { New-Object -Type...
View ArticleAnswer by pdp for How can I find/identify large commits in Git history?
I was unable to make use of the most popular answer because the --batch-check command-line switch to Git 1.8.3 (that I have to use) does not accept any arguments. The ensuing steps have been tried on...
View ArticleAnswer by Vojtech Vitek - golang.cz for How can I find/identify large commits...
Try git ls-files | xargs du -hs --threshold=1M.We use the below command in our CI pipeline, it halts if it finds any big files in the git repo:test $(git ls-files | xargs du -hs --threshold=1M...
View ArticleAnswer by raphinesse for How can I find/identify large commits in Git history?
A blazingly fast shell one-linerThis shell script displays all blob objects in the repository, sorted from smallest to largest.For my sample repository, it ran about 100 times faster than the other...
View ArticleAnswer by Julia Schwarz for How can I find/identify large commits in Git...
If you are on Windows, here is a PowerShell script that will print the 10 largest files in your repository:$revision_objects = git rev-list --objects --all;$files = $revision_objects.Split() |...
View ArticleAnswer by schmijos for How can I find/identify large commits in Git history?
If you only want to have a list of large files, then I'd like to provide you with the following one-liner:join -o "1.1 1.2 2.3" <(git rev-list --objects --all | sort) <(git verify-pack -v...
View ArticleAnswer by Warren Seine for How can I find/identify large commits in Git history?
You should use BFG Repo-Cleaner.According to the website:The BFG is a simpler, faster alternative to git-filter-branch for cleansing bad data out of your Git repository history:Removing Crazy Big...
View ArticleAnswer by skolima for How can I find/identify large commits in Git history?
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 thengit rev-list --objects --all \ | grep...
View ArticleAnswer by friederbluemle for How can I find/identify large commits in Git...
Step 1 Write all file SHA-1 hash values to a text file:git rev-list --objects --all | sort -k 2 > allfileshas.txtStep 2 Sort the blobs from biggest to smallest and write results to text file:git gc...
View ArticleAnswer by Mark Longair for How can I find/identify large commits in Git history?
I've found this script very useful in the past for finding large (and non-obvious) objects in a Git repository:Git script to show largest pack objects and trim your waist line!#!/bin/bash#set -x# Shows...
View ArticleHow can I find/identify large commits in Git history?
I have a 300 MB Git repository. The total size of my currently checked-out files is 2 MB, and the total size of the rest of the Git repository is 298 MB. This is basically a code-only repository that...
View Article