Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Git cleanup alias
[alias]
cleanup = "!f() { git remote prune origin && git checkout develop && git fetch --all && git pull && git branch --merged develop | grep -vE ' develop$| master$| staging$| testing$' | xargs -n 1 git branch -d; }; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.