-
Notifications
You must be signed in to change notification settings - Fork 533
Perform git push before deleting branch #330
Conversation
This addresses an issue when using a feature branch that is associated with a pull request on GitHub when the develop branch is merge protected. In the current implementation of `git flow feature finish`, the remote feature branch is deleted before the merged develop branch has been pushed. This causes the pull request to be closed before the changes have been merged, so the approval no longer applies. To a certain extent this seems to be a bug with GitHub, but I don't see a drawback to pushing before deleting the remote branch.
|
will this be eventually merged? |
|
it would be nice if this PR were merged. |
|
Will it be merged or not? |
|
This would greatly help cleanup our workflow. Seems awkward having to manually delete the branches just to avoid this bug. Any comment from the maintainer @petervanderdoes ? |
|
I'll double check and possibly pull it in tonight (Eastern Time Zone) |
|
@petervanderdoes any problems with the merge? I'd like to have this resolved officially rather than having to apply a patch to the script. If there is work that needs to be done I'd be willing to help. |
|
Work and Personal stuff is getting in the way. Planned to review and implement this weekend. |
|
Actually, upon closer inspection of this the fix here only applies to finishing features. This should be done for bugfix and hotfix as well (and maybe even release). @pokey can you update your PR with these? |
|
Done; nice catch |
|
Any news on this one, it would be a great feature to help our workflow too. |
|
+1 |
|
Fwiw I'm using this script as a workaround. I just put it on my path and then run |
|
not having this breaks integration with github, this is quite important |
|
Hi there! Any news on this PR? It would be super helpful to have in! |
|
This is my #️⃣1️⃣ pet peeve w/ this implementation of git-flow and I have patched my local version with this pull request. Hope to see this merged in soon. |
|
In my opinion, having used git flow for 3 years, this is the only missing thing that I wish was addressed. |
|
Added to release 1.12.0 |
|
This update is landing in homebrew within the next few hours: Homebrew/homebrew-core#36388 Once this gets approved, you can run |
|
Thank you @pixelyunicorn for updating Homebrew |
|
This feature does not seem to work at all for me nor the people I am working with. I have confirmed that Here is what |
|
This resolved it for my team using the default flow config. Be sure your configs don't have something odd in them. |
|
If you used More info on setting default values on the wiki page Configuration |
|
@petervanderdoes Thanks for the clarification, that worked for me! (I changed repos recently and forgot to set that as the config) |
|
If you want it to be for all your repo's on your computer |

This addresses an issue when using a feature branch that is associated with a pull request on GitHub, when the develop branch is merge-protected. In the current implementation of
git flow feature finish, the remote feature branch is deleted before the merged local develop branch has been pushed. This causes the pull request to be closed before the changes have been merged, so the approval no longer applies and the push is rejected. To a certain extent this seems to be a bug with GitHub, but I don't see a drawback to pushing before deleting the remote branch.