petervanderdoes/gitflow — pull request #51 by adutra (2012-12-17 15:09:25+00:00)
Title: Fixing issue: Git refuses to delete local branch if it is tracking a remote one.

Hello,

Im' trying to fix the following issue:

When a feature/release/hotfix is published and then finished, Git would refuse to delete the local branch because it is tracking a remote one. The message is:

> warning: not deleting branch 'hotfix/xxx' that is not yet merged to
> 'refs/remotes/origin/hotfix/xxx', even though it is merged to HEAD.
> error: The branch 'hotfix/xxx' is not fully merged.

Git version is 1.8.0.1.

I fixed the problem by deleting the remote branch *prior* to deleting the local one.

Additionnally, I brought a small improvement: a new option "force_delete" for releases and hotfixes to force local branch deletion ("-D"), similar to the existing one for features.