上传时远程拒绝git push错误

时间:2012-12-20 19:11:50

标签: git open-source repository

在执行git推送之前有没有人看到过这个错误?有没有调试或克服错误的提示?

mkdir opensource && cd opensource
git clone git://git.qinc.com/platform/vendor/q-opensource/wcn/prime.git
cd prime
git checkout -b jb_2.5 origin/jb_2.5
git cherry-pick -x ..7174961054435d3ae9d233c81227b0715cfc1715
git push ssh://review-android.qinc.com:29418/platform/vendor/q-opensource/wcn/prime.git jb_2.5:refs/for/jb_2.5

test@wcn-linux5:/local/mnt2/workspace2/test/LA_builds/opensource_JB2.5/prime$ git push ssh://review-android.qinc.com:29418/platform/vendor/q-opensource/wlan/prime.git jb_2.5:refs/for/jb_2.5
Enter passphrase for key '/usr2/test/.ssh/id_rsa':
Counting objects: 662, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (100/100), done.
Writing objects: 100% (148/148), 534.35 KiB, done.
Total 148 (delta 88), reused 97 (delta 47)
remote: Resolving deltas: 100% (88/88)
remote: Processing changes: refs: 1, done   
remote: (W) be1d372: no files changed, was rebased
To ssh://review-android.qinc.com:29418/platform/vendor/q-opensource/wlan/prime.git
! [remote rejected] jb_2.5 -> refs/for/jb_2.5 (no changes made)
error: failed to push some refs to 'ssh://review-android.qinc.com:29418/platform/vendor/q-opensource/wlan/prime.git'

1 个答案:

答案 0 :(得分:1)

在推送更改之前,看起来有一个推送没有拉动,因此它会覆盖主分支。您应该拉出主分支,然后在推动整个变换集后与变更集合并。

或者,如果你有权限,你可以使用push -f,但它会杀死任何其他人的推动。