search

Home  >  Q&A  >  body text

branch - git branch merge

As shown in the figure, there are two new functions, which are implemented in branch 1 and branch 2 respectively, and are merged into the develop branch in turn.

Then the problem came. When I wanted to merge develop into master and release it to the production environment, I suddenly found that branch 1 had serious problems and could not be launched in this version, and branch 2 was based on the existing version. merge was developed by the branch 1 branch of develop, which means that the code of branch 2 already contains the code of branch 1.

In such an application scenario, what is the best practice to only change the branch 2 modified code from merge to master?

天蓬老师天蓬老师2807 days ago624

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2017-05-02 09:43:03

    The principle of git is to track each modified file. You can use git log to check the different contents of the specific submission of the version. After modification, try to request merge again.

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-02 09:43:03

    In principle, you should use hotfix on the master to modify the problem of branch1. After the repair is completed, merge the hotfix back to master and develop, and then merge develop back to branch2
    You can refer to this process http://danielkummer.github.io ...

    reply
    0
  • Cancelreply