-
Notifications
You must be signed in to change notification settings - Fork 529
merge hotfix into current release #161
Comments
This is something we'd like too. |
this is actually expected behavior
|
What's the development status of this feature? How do you suggest to workaround this meanwhile? |
This is unbelievable. More than four years without a fix. It's a ticking time bomb, rendering the whole tool useless. |
Alright opening up an old issue here. :)
Result:
Next
Result
|
Isn't this not only an edge-case but slightly against the gitflow model itself? If your master is ahead of release or you are supporting multiple version production branches, gitflow won't cover that - it's a well-defined flow, and custom domain logic should not be catered to..? |
I agree with @raveren. It's not part of the original model, to have a master (production branch) being ahead of the next upcoming release branch. If someone is following such a model, then git-flow is not the right tool for that job. Actually, having the 2.0 within master (being the production branch!), how would you create a release being targeted to be merged into that branch, without being based on that very branch? This would require to commit into the production branch directly - for a fairly long time (derived by the major version increase) - which is against the branching model and probably not a good idea either. Leaving the branching out of scheme, the timeline would be: develop -> feature -> develop -> release -> master -> develop (repeat), (fork:) hotfix -> master, develop, release. In case you are supporting multiple versions (v1.1 released and v2.0 released having separate release branches), git-flow may ask the user whether to merge into any found release branch, if there are more than one. On a single version line setup, this question should be skipped. |
Oh I totally agree this is might be an extreme, if not implausible, case but I have seen cases where people create release branches from support branches. I used this example to make it very clear about the problem that could arise if you have multiple release branches for multiple versions and you automatically want to apply a hot fix to all release branches. |
What's the use-case of having the release branches of 2.1 und 2.2 around? As far as I'm using git-flow, the 2.1 is deleted once closed on the very basic level. I think we should ease the 80-90% use-case, which is streamlined versioning based on the original git-flow. What's the signature of the cherry-pick you mentioned? |
The new cherry-pick command would be I'm not opposed to merging into a release branch, especially when we can decided to not doing the merge if there is more than one release branch. I would also add an option to the |
Hmm, I just read a interesting story on why cherry-picking can be a problem. If we would cherry pick the hotfix branch into release there could potentially be a problem when finishing the release branch. The problem is caused by the fact that the master and develop branch all ready have the commits from hotfix branch and those also exist in the release branch. See http://stackoverflow.com/questions/20380013/git-merge-strategies-spaces-make-default-shows-no-conflict-and-bring-unexpected The only thing I can think of right now would be rebasing the release branch after the hotfix branch has been merged in develop. |
That's not a limitation to the cherry-pick, but merges in general. That's why the While I see use-cases for the cherry-pick, I don't see it being a valid substitute for merging the hotfix into release but rather an addition to other use-cases. The major advantage is not to have another command to run. That's what we are doing right now: "manually" merging the master into release, after |
Yeah, I just realized rebasing of of develop is just as bad. It would imply that develop remains untouched while there is a release branch, and that's not happening. |
Hi folks, new to Git and Git Flow. I am going through the behavior and was surprised that the hotfix was only merged into master and develop when there was also a release branch present, I would think a hotfix on the latest release would need to go into current development as well as the next pending release. Example: If I create a hotfix for 7.0.0 (off of master) and finish it, I want that fix in current development (develop) AND my upcoming release (release 7.1.0). Default behavior should be to merge it forward to all new releases. This model would also work with support branches, if I add the following to my above example: Finishing a hotfix on 6.0.1 should at least give me the option to merge to master (7.0.0), release/7.1.0 and develop, covering all future work. It seems to me that it would be a good feature to ask for intended targets when release branches are detected. |
Just fell into that hole. There is a new issue open on the original topic of this thread (#414 ), along with a proposed solution and a pull request. Looks promising to me. |
Add new option releaseBackMerge to git flow hotfix finish when there is an existing release on a remote repository we can now backmerge the hotfix onto the release branch as well as develop and master. Origional author of PR: Bankers, R.H.M. (Rob) <[email protected]> closes nvie/gitflow#177 and closes petervanderdoes/gitflow-avh#161
Add new option releaseBackMerge to git flow hotfix finish when there is an existing release on a remote repository we can now backmerge the hotfix onto the release branch as well as develop and master. closes #69 closes nvie/gitflow#177 closes petervanderdoes/gitflow-avh#161
If there is a
release
branch present (locally) and Ifinish
ahotfix
the resultingmaster
branch should be merged into therelease
branch, too.Currently the
hotfix
is only merged intomaster
anddevelop
.This may be optional. We got a release management including RC versions, which are based on the current release branch. However, currently we need to manually merge the master back into release branch when finishing a hotfix.
The text was updated successfully, but these errors were encountered: