How can I push my changes to a remote branch

前端 未结 5 1467
借酒劲吻你
借酒劲吻你 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条回答
  •  猫巷女王i
    2020-12-31 12:54

    I think you just want to push your changes, so:

    git push old_remote master
    

    should be enough for you. The first parameter for git push is the remote you want to update (in your case that's old_remote') and the second is the branch you want to push.

    Instead of specifying branch with name, you can use --all like this:

    git push old_remote --all
    

提交回复
热议问题