Git merge master into feature branch

后端 未结 11 703
既然无缘
既然无缘 2020-11-27 08:56

Let’s say we have the following situation in Git:

  1. A created repository:

    mkdir GitTest2
    cd GitTest2
    git init
    
  2. Some m

11条回答
  •  再見小時候
    2020-11-27 09:14

    Based on this article, you should:

    • create new branch which is based upon new version of master

      git branch -b newmaster

    • merge your old feature branch into new one

      git checkout newmaster

    • resolve conflict on new feature branch

    The first two commands can be combined to git checkout -b newmaster.

    This way your history stays clear because you don't need back merges. And you don't need to be so super cautious since you don't need to do a Git rebase.

提交回复
热议问题