简体   繁体   中英

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

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...

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.

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