I rewrote the tree to my git repository to fix errors in the author name and email address。现在我试图将固定的树推到我在Source Forge上的回购。 CharlesB told me how to update the config file on the Source Forge servers。我的配置文件看起来像这样:Source Forge回购给出了“拒绝非快速转发/头/主”错误
[[email protected] bbct]$ cat config
[core]
repositoryformatversion = 0
filemode = true
bare = true
sharedrepository = 2
[receive]
denyNonFastforwards = false
现在,当我试图迫使一推,我得到以下错误:
$ git push -f
Password:
Counting objects: 464, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (148/148), done.
Writing objects: 100% (452/452), 470.65 KiB, done.
Total 452 (delta 268), reused 417 (delta 247)
remote: error: denying non-fast-forward refs/heads/master (you should pull first)
To ssh://[email protected]/p/bbct/code
! [remote rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://[email protected]/p/bbct/code'
这是怎么回事?更重要的是,我该如何解决它?
更新:
公共校园计算机上运行git push -f
给出与上面相同的错误消息。
另一个更新:
我克隆SF回购到一个临时文件夹,该临时回购的主分支重置为提交之前先用错误的作者和电子邮件提交,然后跑git push -f
。我得到确切同样的错误信息,与我原来的回购:
$ git push -f
Password:
Total 0 (delta 0), reused 0 (delta 0)
remote: error: denying non-fast-forward refs/heads/master (you should pull first)
To ssh://[email protected]/p/bbct/code
! [remote rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://[email protected]/p/bbct/code'
我猜SF真的不希望我做一个非快速向前提交这里:-(
所以这是你的上一个问题相同的错误? – CharlesB
是的,看起来如此。除了现在,我没有得到“权限被拒绝”的错误。我现在也在不同的机器上。 –
原来的机器'push -f'工作,而不是这个? – CharlesB