简体   繁体   中英

GitFlow: when to delete or freeze feature/release branches?

Learning GitFlow and have some concerns that I haven't found answers to in any of the docs/articles I've read.

Per GitFlow, after the release branch has passed QA in some testing/staging environemnt, a production release occurs and the release branch gets merged into master (where it is also tagged w/ a version number) as well as back into develop .

I believe we ONLY need to merge back into develop IF bugs cropped up during the QA process that required changes being made directly to the release branch. Yes? I assume if release contains nothing new on it that we don't need to merge it with develop again, right?!

I assume this also implies that when changes are made to release during testing/QA, that if they don't get merged back into develop , that we open ourselves up to regressions, right ? Meaning that if the develop branch never gets the changes added to it that QA requested during testing, that if the release branch gets blown away, those changes are lost.

I'm also unsure of what GitFlow prescribes for actually " closing " branches (both feature branches and release branch alike). After they are merged in, are feature branches deleted? Or somehow frozen for further revision? After merging into master / develop is release supposed to be deleted or frozen as well?

I would always suggest that you follow the process and always attempt the merge of the release branch into develop. If there are no commits that don't exist on the develop branch, then git will inform you of this. You will have essentially have performed a no-op.

Correct, if you don't merge release to develop then you leave yourself open to regressions. Even if the release branch gets deleted, you will still have a history of the commits that made it onto master branch, so you would still be able to recover them, by cherry picking out the commits as required.

You would create a new feature and release branch for each thing. For example, feature/abc , feature/bdc , release/1.0.0 release/1.1.0 , etc. Once these features and releases are complete the branch is deleted and not used again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM