Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Add "git flow cleanup" command #94

nvie opened this Issue · 6 comments

6 participants


Cleanup should be able to detect what feature/hotfix/release branches have been merged into develop/master upstream (remotely) and delete them remotely and locally.


Per our tweets, would also be ideal to have an arg or config value that would automatically delete remote branches when finishing a feature/hotfix/release


Possible problem could be that when one developer deletes remote branches, they are still present in local repos of other developers. It would be necessary to include git remote prune origin somewhere.


+1 This would be great! Confusing people who are not very familiar with git.


Is this ever going to happen?


Was just looking for this feature :+1:


@nvie I've ended up writing a script to do this, though it's kinda ghetto;


# Remove feature branches which are merged.

OLD_BRANCH=`git branch | awk '/\*/{ print $2 }'`

git checkout develop
git branch --merged | awk '/feature/{ print $1 }' | xargs git branch -d {}
git checkout $OLD_BRANCH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.