How can I push my changes to a remote branch

前端 未结 5 1450
借酒劲吻你
借酒劲吻你 2020-12-31 12:25

I am on a master branch \'master\' and I have 1 commit ahead I want to create a new remote branch called \'new_remote\' and push my commit there?

$ git branc         


        
5条回答
  •  南方客
    南方客 (楼主)
    2020-12-31 13:04

    Although what you are trying is perfectly legal in git, from a general best practice standpoint (when you have many parallel lines of development) I'd suggest to create a local tracking branch and push it to your remote.

    git branch --track local_branch remote_branch
    

提交回复
热议问题