Skip to content

Instantly share code, notes, and snippets.

@brancusi
Last active November 4, 2016 02:11
Show Gist options
  • Save brancusi/3598a979f841d46b68575aae50eebf02 to your computer and use it in GitHub Desktop.
Save brancusi/3598a979f841d46b68575aae50eebf02 to your computer and use it in GitHub Desktop.
Delete all local branches except masterDelete all remote branches
git branch | grep -v master | xargs git branch -d
git fetch fork --prune
git branch -a | grep remotes/fork | grep -v master | sed 's/remotes\/fork\///g' | xargs git push fork --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment