git pull on a different branch

后端 未结 4 1632
耶瑟儿~
耶瑟儿~ 2021-02-01 01:37

If I\'m working on a branch and then realize I need to merge another branch into mine here is my current workflow (for this example lets say that I\'m working on my-branch and w

4条回答
  •  盖世英雄少女心
    2021-02-01 02:12

    I found an incantation that worked for me:

    git fetch origin master:master
    

    then (if you want to merge right away):

    git merge master
    

    I was really surprised how hard it was to find an answer to this since it seems like it would be a common use case.

提交回复
热议问题