Trim unused git branches

edit ✏️

Trim branches no longer on origin

git remote prune origin --dry-run
git remote prune origin

Find branches already merged

git checkout main
# list remote branches that have already been merged into main
git branch -r --merged
# list local branches that have already been merged into main
git branch --merged


Socials