SamJolly
SamJolly

Reputation: 6477

Git-Flow, Why is "develop" branch one step beyond "master" after "release finish"

We have noticed that the "develop" branch is one commit ahead of the "master" after a "git flow release finish".

The following is the extra commit.

commit b4c00f50c980f22c0afcc15bd61e4911bd6bb5d5
Merge: 4000a21 18e1aee
Author: Joe Bloggs <[email protected]>
Date:   Tue May 31 15:27:30 2016 +0100

Merge tag '1.0.0.4' into develop

1.0.0.4

Thanks in advance

Upvotes: 3

Views: 896

Answers (1)

Smigs
Smigs

Reputation: 2452

After a release is finished, its branch is merged with develop as well as with master - this is done to ensure that any changes made on the release branch make it back into the develop branch. The commit you've noticed is the result of that merge. If this merge didn't happen, you could have changes in master that are not in develop. develop then shows as one commit ahead of master as the merge commits for the two branches are two different commits.

The original git flow blogpost shows this merge clearly on the example diagram: git flow branching diagram Here, the release branches are in green; you can see they are merged into both develop and master once they're done with [and you can optionally merge into develop at any point before the release is done, if needed].

Upvotes: 6

Related Questions