A simple way to clean up your git project branches

When you switch between branches and get lost in the names…

TD;LR: just use theses

git branch -d $(git branch --merged=master | grep -v master)
git fetch --prune
On a bad day, an actual complete screenshot would take 3 screens…
git branch --merged=master
git branch -d $(git branch --merged=master)
git branch -d $(git branch --merged=master | grep -v master)
Much cleaner
Once you know it, you can’t un-see the mess here
git fetch --prune
Feels nice

CTO & Founder @ Windoo, a platform for happiness at work ! https://windoo.fr

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store