Should I merge master into a feature branch to bring it up to date? Would this be considered bad practice?

后端 未结 2 1206
暖寄归人
暖寄归人 2021-02-15 22:37

I have a situation like this:

            (master)
A - B - E - F
      \\       
        C - D
            (feature-x)

Should I merge master i

2条回答
  •  你的背包
    2021-02-15 23:33

    The most common workflow for handling this situation would probably be to rebase your feature branch on the master branch:

    $ git checkout feature-x
    $ git rebase master
    

    This gives you:

                (master)
    A - B - E - F
                 \       
                   C - D
                       (feature-x)
    

提交回复
热议问题