300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > git 推送本地分支到远程分支 git push origin

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

时间:2022-10-18 01:24:09

相关推荐

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

** 情形:**在本地分支local_branch修改了代码,之后要提交到远程分支remote_branch上,使用命令git push origin remote_branch报错。

** 报错:**

error: src refspec remote_branch does not match any

error: failed to push some refs to ‘http://****.git’

** 解决方案:**

git push origin local_branch:remote_branch

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

a.远程已有remote_branch分支并且已经关联本地分支local_branch且本地已经切换到local_branchgit pushb.远程已有remote_branch分支但未关联本地分支local_branch且本地已经切换到local_branchgit push -u origin/remote_branchc.远程没有remote_branch分支并,本地已经切换到local_branchgit push origin local_branch:remote_branch

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。