How to get changes from another branch

后端 未结 5 1322
执笔经年
执笔经年 2021-01-29 20:20

I am currently working on featurex branch. Our master branch is named branch our-team. Since I started working on featurex, more changes h

5条回答
  •  深忆病人
    2021-01-29 20:54

    1. go to the master branch our-team

      • git checkout our-team
    2. pull all the new changes from our-team branch

      • git pull
    3. go to your branch featurex

      • git checkout featurex
    4. merge the changes of our-team branch into featurex branch

      • git merge our-team
      • or git cherry-pick {commit-hash} if you want to merge specific commits
    5. push your changes with the changes of our-team branch

      • git push

    Note: probably you will have to fix conflicts after merging our-team branch into featurex branch before pushing

提交回复
热议问题