I am following a git flow model with my branches, and thus have a develop and master branch, which originally were in sync.
My process is create a feature branch from develop, merge it into develop when done with the feature, create a release branch, apply any fixes and when tested fully, merge the release branch back first into the develop branch and then into master.
So they should have been in sync, but apparently have diverged, because every time I merge the release branch into master I am getting merge errors where its asking me to resolve them manually.
My question is, is it a good idea to overwrite the master branch completely with the develop branch and thus start fresh, which I can afford to do at this point in time, or is there another solution to this type of problem ?
If you're not able to cleanly merge develop
into master
then there has to be something in master
that's not in develop
. You certainly could just declare bankruptcy and push --force
develop
to replace master
, but I would personally be wary of losing something important that just never found its way into master
.
After a successful merge of develop
into master
, does git diff master develop
show anything interesting?
It seems since you don't mind blowing away your changes in master that are not in develop, you should just overwrite master with develop; going forward, according to your flow you should never be making commits to master, only branch off of develop, then merge into develop, and once in a while merge develop into master when you are sure your build is clean
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.