Delete branches already merged to master git branch --merged master | grep -v "master" | xargs -n 1 git branch -d Reduce git repository size git gc --aggressive --prune=now