git push命令用于将本地提交推送到其他远程分支

时间:2013-07-31 23:33:03

标签: android git repository

我同步到一个repo树,它是分支“jb”...我在这个分支上有一个本地提交,我试图推送到一个远程分支“jb_mr2”并运行到以下错误..是有一个git push命令我可以用来将这个本地提交推送到“jb_mr2”

terminal3{73}> git push ssh://company.com:29418/platform/vendor/com-proprietary/ship/ftm 72bc75e409e50dcad29bd790b4b6478dc6668f12:refs/for/jb_mr2
Counting objects: 9, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 7.01 KiB, done.
Total 6 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3)
remote: Processing changes: refs: 1, done   
To ssh://company.com:29418/platform/vendor/com-proprietary/ship/ftm
 ! [remote rejected] 72bc75e409e50dcad29bd790b4b6478dc6668f12 -> refs/for/jb_mr2 (branch jb_mr2 not found)
error: failed to push some refs to 'ssh://company.com:29418/platform/vendor/com-proprietary/ship/ftm'

1 个答案:

答案 0 :(得分:0)

我能够更多地使用它并拥有更好的解决方案。如果我正确读给你,远程分支“jb_mr2”已经存在。从提交的本地分支运行:

git push ssh://company.com:29418/platform/vendor/com-proprietary/ship/ftm 72bc75e409e50dcad29bd790b4b6478dc6668f12:jb_mr2

如果遥控器不存在:

git push ssh://company.com:29418/platform/vendor/com-proprietary/ship/ftm 72bc75e409e50dcad29bd790b4b6478dc6668f12:/refs/heads/jb_mr2