merge one local branch into another local branch

后端 未结 2 817
感情败类
感情败类 2020-12-22 15:05

I have multiple branches which are branched off the master (each in a separate subdirectory).

  • Branch1: new development, not yet completely finished
  • Br
相关标签:
2条回答
  • 2020-12-22 15:39
    1. git checkout [branchYouWantToReceiveBranch] - checkout branch you want to receive branch
    2. git merge [branchYouWantToMergeIntoBranch]
    0 讨论(0)
  • 2020-12-22 15:51

    First, checkout to your Branch3:

    git checkout Branch3
    

    Then merge the Branch1:

    git merge Branch1
    

    And if you want the updated commits of Branch1 on Branch2, you are probaly looking for git rebase

    git checkout Branch2
    git rebase Branch1
    

    This will update your Branch2 with the latest updates of Branch1.

    0 讨论(0)
提交回复
热议问题