Skip to main content

Quick Git Commands

Remove merged branches

git branch --merged origin/master | rg -v "main" | xargs git branch -d

Make sure to test the first command before running the whole line, you don't want to accidentally delete your main branch