Skip to content

Instantly share code, notes, and snippets.

@sinsoku
Created August 28, 2012 11:34
Show Gist options
  • Save sinsoku/3497394 to your computer and use it in GitHub Desktop.
Save sinsoku/3497394 to your computer and use it in GitHub Desktop.
delete origin feature branches
#/bin/sh
tags=`git branch -r | grep "origin/feature" | sed -e "s/ origin\///g"`
if [ -n "${tags}" ]; then
for t in "${tags}"
do
echo git push --delete origin ${t}
git push --delete origin ${t}
done
else
echo "notice: no remote feature branches"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment