Skip to content

Instantly share code, notes, and snippets.

@anapaulagomes
Last active February 5, 2019 16:37
Show Gist options
  • Save anapaulagomes/1ab870933af20afe52de2e1f738afe0e to your computer and use it in GitHub Desktop.
Save anapaulagomes/1ab870933af20afe52de2e1f738afe0e to your computer and use it in GitHub Desktop.
Generate list of old branches with command to delete them
git for-each-ref
--sort=-committerdate refs/heads/
--format='git branch -D %(color:yellow)%(refname:short)%(color:reset) # (%(color:green)%(committerdate:relative)%(color:reset))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment