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

后端 未结 2 665
暗喜
暗喜 2021-02-15 22:30

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:26

    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)
    

提交回复
热议问题