delete all merged git branch (alias gbpurge)

housekeeping local branches

Date de publication

13 janvier 2025

Just add this to ~/.bashrc

alias gbpurge='git branch --merged | grep -Ev "(\*|master|develop|staging)" | xargs -n 1 git branch -d'

source : https://stackoverflow.com/questions/17983068/delete-local-git-branches-after-deleting-them-on-the-remote-repo