git 推送本地分支到远程分支 git push origin
** 情形:**在本地分支local_branch修改了代码,之后要提交到远程分支remote_branch上,使用命令git push origin remote_branch报错。** 报错:**error: src refspec remote_branch does not match anyerror: failed to push some refs to ‘http://****.g
·
** 情形:**在本地分支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_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
更多推荐
已为社区贡献2条内容
所有评论(0)