Skip to content

Instantly share code, notes, and snippets.

@nestoralonso
Last active September 3, 2020 17:36
Show Gist options
  • Save nestoralonso/7db196fe41740097ad21176aa83a4cc8 to your computer and use it in GitHub Desktop.
Save nestoralonso/7db196fe41740097ad21176aa83a4cc8 to your computer and use it in GitHub Desktop.
Unused Branches
for k in $(git branch -r --merged| sed /\*/d | egrep -v "(^\*|master|dev)"); do
if [ -n "$(git log -1 --before='2 weeks ago' -s $k)" ]; then
echo $k
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment