Last active
December 12, 2017 20:27
-
-
Save tehmoon/b63f76ca98a46f51986b9766681e4466 to your computer and use it in GitHub Desktop.
Disk space size of each remote branch in git
This file contains hidden or 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
for a in $(git branch -a | grep remotes | awk '{print $1}' | sed 's/remotes\/origin\///'); do echo -n ${a} -\ ; git clean -d -x -f > /dev/null 2>&1 ;git checkout ${a} > /dev/null 2>&1; du -hs -I .git .;done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment