Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Trindaz/d809b9c9db438d0292ec9b3bc64dca24 to your computer and use it in GitHub Desktop.
Save Trindaz/d809b9c9db438d0292ec9b3bc64dca24 to your computer and use it in GitHub Desktop.
for k in $(git branch | sed /\*/d); do
if [ -n "$(git log -1 --before='1 month ago' -s $k)" ]; then
git branch -D $k
git push origin --delete $k
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment