I have many Git branches. How do I delete branches which have already been merged? Is there an easy way to delete them all instead of deleting them one by one?
If you're on Windows you can use Windows Powershell or Powershell 7 with Out-GridView to have a nice list of branches and select with mouse which one you want to delete:
git branch --format "%(refname:short)" --merged | Out-GridView -PassThru | % { git branch -d $_ }
after clicking OK Powershell will pass this branches names to git branch -d
command and delete them