Git merge master into feature branch

后端 未结 11 698
既然无缘
既然无缘 2020-11-27 08:56

Let’s say we have the following situation in Git:

  1. A created repository:

    mkdir GitTest2
    cd GitTest2
    git init
    
  2. Some m

11条回答
  •  眼角桃花
    2020-11-27 09:34

    Complementing the other answers, as these commands are recurrent we can do it in a row (given we are in the feature branch):

    git checkout master && git pull && git checkout - && git merge -
    

    Or add them in an alias:

    alias merge_with_master="git checkout master && git pull && git checkout - && git merge -"
    

提交回复
热议问题