How can I push my changes to a remote branch

前端 未结 5 1427
借酒劲吻你
借酒劲吻你 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:07

    If you are currently working on local branch master, and the new remote branch has not been created yet:

    git checkout -b new_branch     // creates a local branch (as a copy of the current)
    
    git push origin new_branch // push it to the remote server
    

提交回复
热议问题