简体   繁体   中英

gitflow merging release branches separately to mater and develop

Background:

Git flow suggests to merge the release branch into master and development branches separately. In my view this will create separate merge commits in both the branches and the development branch will never get the commit of master and will be in sync.

My question is, does git flow expect to run in parallel with respect to the files committed and never sync with each other in respect to their individual commits?

or

what is the reason behind having separate commits in both branches?

The master branch is usually never merged back into develop . Thus, merge commits from master will never be merged back into develop . The merge commit in develop , of course, will be merged into master with the next release branch.

By definition, a release branch has to be merged into master (you do want to release it, after all). Since it contains changes that are not in develop (and these changes have no other way to make it to develop , see above), there is no alternative to also merging it back into develop .

So, as you see, there is no alternative to merging the release branch two times. This should, however, not be a problem. If by out of sync you mean that master contains commits that develop does not, ie merge commits, you're right. But that's usually no problem.

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