Skip to content

Instantly share code, notes, and snippets.

@atlasloewenherz
Last active December 17, 2015 13:39
Show Gist options
  • Save atlasloewenherz/5618404 to your computer and use it in GitHub Desktop.
Save atlasloewenherz/5618404 to your computer and use it in GitHub Desktop.
deletefeaturebranch()¬
{
log $0
log $1
while read -u3 line;
do
#if [[ $line =~ ^\*\ ]]
if [[ "$line" == *"$1"* ]]; then
log "$line";
log "switching to develop"
log "executing : git checkout develop"
git checkout develop
log "do you want to merge changes made in $1 back to develop? y/N?"
read -p CONFIRM
case $CONFIRM in
y|Y)
git merge --no-ff $1
;;
*)
log "exit"
;;
esac
fi
done 3< <(git branch)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment