Push commits to another branch

前端 未结 9 1301
走了就别回头了
走了就别回头了 2020-11-29 14:38

Is it possible to commit and push changes from one branch to another.

Assume I commited changes in BRANCH1 and want to push them to BRANCH2<

9条回答
  •  醉话见心
    2020-11-29 15:06

    That will almost work.

    When pushing to a non-default branch, you need to specify the source ref and the target ref:

    git push origin branch1:branch2
    

    Or

    git push  : 
    

提交回复
热议问题