Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add "git flow cleanup" command #94

Open
nvie opened this Issue · 6 comments

6 participants

@nvie
Owner

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.

@rollinsruss

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

@boryn

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.

@ernoaapa

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

@ukd1

Is this ever going to happen?

@warnero

Was just looking for this feature :+1:

@ukd1

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

#!/bin/sh

#
# 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.