Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitflow Release Tagging Model Creates A Dilemma

Tags:

git

git-flow

I'm looking to implement the gitflow branching model at work, as first laid out in http://nvie.com/posts/a-successful-git-branching-model/ or at the Atalssian site at https://www.atlassian.com/git/workflows#!workflow-gitflow . One thing bothers me though and I'm looking for clarification. Once we have a release branch and think its ready we deliver it to QA. They do testing and there is some back and forth of bug reporting and fixing, finally we reach a point where we deliver to QA from the release branch and they accept it, so its ready for release. At this point I would think you would

a) ship the exact same build that was accepted to production

b) tag the git repo code from which this build was done, which would be pointing at the end of your release branch

c) do other bookkeeping to merge the release branch back to dev and master

Instead, gitflow suggest we do c) above and tag the master branch. This would mean either that

a) the build we shipped to production in a) above does NOT correspond exactly to the code the tag points at

or

b) or we do a new build from the newly tagged master branch and ship that, but that would mean what we ship does not correspond exactly to what QA tested and accepted, its a new build

Both of these seem bad. Has anyone encountered similar thoughts? And what solution did you implement.

Thanks.

like image 657
user2456600 Avatar asked Jan 16 '14 01:01

user2456600


People also ask

What does Gitflow release do?

Gitflow release branch process overview The release branch represents a complete feature set. The only commits on the release branch are for bug fixes and important chores. The Gitflow release branch is created off the development branch. Gitflow release is merged into master and also back into development.

Could you explain the Gitflow workflow?

The Gitflow Workflow defines a strict branching model designed around the project release. This workflow doesn't add any new concepts or commands beyond what's required for the Feature Branch Workflow. Instead, it assigns very specific roles to different branches and defines how and when they should interact.


1 Answers

The only way commits get into master is by being included in a release branch or a hotfix. And hotfixes are merged into release branches1. So, when you perform the merge of your release branch into master, it should be a trivial merge and result in the same tree as in your release branch.

To verify this, you can do a git diff release master (or equivalently, git diff master^2 master, i.e. diff the merged commit on the master branch with its 2nd parent, which is the tip of your release branch).

[1] This is a special case that's only mentioned in-line in the text, not in the headings, and may not be implemented in the git flow automation scripts.

like image 89
Matt McHenry Avatar answered Sep 29 '22 11:09

Matt McHenry