Created
May 25, 2021 08:50
-
-
Save giammin/1fd1e96d11805b5fbe36a9acc543110a to your computer and use it in GitHub Desktop.
sort git branches by size with powershell script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git for-each-ref --format='%(refname)' | ForEach-Object { $size = git rev-list --disk-usage --objects HEAD..$_; Write-Output "$size $_" } | Sort-Object -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment