Git merge two local branches

前端 未结 6 936
小鲜肉
小鲜肉 2021-01-29 19:18

I have branch Master, branchA and branchB. Now I\'m working in the branchA and I need to merge branchA with

6条回答
  •  情深已故
    2021-01-29 20:14

    If you or another dev will not work on branchB further, I think it's better to keep commits in order to make reverts without headaches. So ;

    git checkout branchA
    git pull --rebase branchB
    

    It's important that branchB shouldn't be used anymore.

    For more ; https://www.derekgourlay.com/blog/git-when-to-merge-vs-when-to-rebase/

提交回复
热议问题