Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save RomuloOliveira/71aceda5cb946f5ffdf7 to your computer and use it in GitHub Desktop.
Save RomuloOliveira/71aceda5cb946f5ffdf7 to your computer and use it in GitHub Desktop.
Remove branches no longer on remote
git fetch -p
git branch -vvv | grep gone | grep -v master | cut -f 3 -d " " # | xargs git branch -D
@nsenave
Copy link

nsenave commented Feb 18, 2022

very useful, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment