Peter Kahn
Peter Kahn

Reputation: 13046

Why merge commits for git flow release finish instead of fast-forward HEAD update?

Does git flow avoid fast forward merges for better reporting?

While testing git flow I see not only the commits from my release branch on master & develop but also merge commits. I thought I'd only see release branch commits and then a fast-forward as git adjusted master & develop to point to the new commits.

As a very simple case, I expected no merge commit requirement since no other changes appeared between the time of release branch start and finish.

What drives the merge commit requirement or did I miss something?

Thanks

Peter

Scenario: Release Stabilization

  1. Create release branch (git flow release start 100.0.0 develop)
  2. Push for collaboration (git flow release publish 100.0.0) (it's just me, so I'm collaborating with myself)
  3. make and commit 1 change on release/100.0.0
  4. Finish release (git flow release finish)

RESULT

local develop +3 commits to remote
  HEAD    merge tag to develop e191707
  HEAD -1 e0040cb merge from release branch
  HEAD -2 e7cdc02 release branch change

local develop +3 commits to remote
  HEAD    merge tag to develop e191707
  HEAD -1 e0040cb merge from release branch
  HEAD -2 e7cdc02 release branch change

local master + 2 commit to remote
  HEAD e0040cb merge commit 
  HEAD -1 e7cdc02 stabilization change 

Upvotes: 1

Views: 1089

Answers (1)

Peter Kahn
Peter Kahn

Reputation: 13046

It seems that git flow uses git merge --no-ff as its default (see git flow considered harmful). I don't think that choice help improve understanding and creates unnecessary noise. I expect us to use git flow provided we can sort out when to use ff

Upvotes: 1

Related Questions