git 推送本地分支到远程分支 git push origin

时间:2024-11-09 19:50:06

 

转载自:/u013749540/article/details/78295420

 

创建本地分支看这里 /torpidcat/article/details/105550496

 

推送本地分支local_branch到远程分支 remote_branch并建立关联关系

      a.远程已有remote_branch分支并且已经关联本地分支local_branch且本地已经切换到local_branch

          git push

     b.远程已有remote_branch分支但未关联本地分支local_branch且本地已经切换到local_branch

         git push -u origin/remote_branch

     c.远程没有remote_branch分支并,本地已经切换到local_branch

        git push origin local_branch:remote_branch