Git Clean local branches

  • Language:: Bash
  • Type:: Source Code Management
  • Context:: cleans up branches that have already been merged into the branch you are currently on.
  • Description
  • Snippet
 
git branch --merged | egrep -v "(^\*|main|phase-2|phase-2-develop)" | xargs git branch -d
 

📇Additional Metadata

  • 📁Type:: snippet
  • 🏷️Tags:: Git
  • 📡Status:: #status/🌲