File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -366,3 +366,15 @@ diffDrillDownAdvanced () {
366366 done
367367 fi
368368}
369+
370+ repoSize () {
371+ executeCommand " git gc"
372+ executeCommand " git count-objects -vH"
373+ executeCommand " git rev-list --objects --all | grep -f <(git verify-pack -v .git/objects/pack/*.idx| sort -k 3 -n | cut -f 1 -d ' ' | tail -10)"
374+ echo " Enter file pattern to REMOVE in repo history:"
375+ read filePattern
376+ [ " ${filename} " = " " ] && waitonexit && return
377+ executeCommand " git filter-repo --path-glob '" ${filePattern} " ' --invert-paths --force"
378+ executeCommand " git gc"
379+ executeCommand " git count-objects -vH"
380+ }
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ menuItem r "Show branch history" showBranchHisto
3030echo
3131submenuHead " Other usefull actions:"
3232menuItemClm s " Working with diffs" workingDiffs w " Atlassian's view" atlassiansView
33- menuItem c " Change last commit message" " git commit --amend"
33+ menuItemClm c " Change last commit message" " git commit --amend" x " Descrease repo size " repoSize
3434echo
3535submenuHead " Git admin actions:"
3636menuItemClm 1 " Show local git config" localGitConfig 2 " Show global git config" globalGitConfig
You can’t perform that action at this time.
0 commit comments