Git-flow hotfix merging to develop being ahead produces XX commits ahead

311 views Asked by At

How to reproduce:

  1. Develop is 6 commits ahead master.
  2. Create hotfix branch from master.
  3. Make 2 commits to on hotfix.
  4. Finish hotfix branch (merge to master, tag, merge to develop)
  5. Master is now 3 ahead origin/master (2 commits+merge commit)
  6. Develop is 57 ahead origin/develop (WHAT?!)

Why isn't local devleop 3 ahead origin/develop? I have a feeling it has to do with the --no-ff flag in the merges...

1

There are 1 answers

3
Guillermo Mansilla On

I had the same situation once. Since I had write access to the main repo I was doing the merge operations directly to upstream. That would cause some problems. So instead of doing the merge manually you must do it through a pull request, that is, push your Hotfix branch to your origin (your fork) then create a pull request from hotfix to master, after accepting the pull request the hotfix branch will be merged to master.

Now just open a pull request from master to develop.