试图推到格瑞特身上。没有共同的血统。

nolan@nolan-pc:~/pac-man$ git push ssh://[email protected]:29418/android_vendor_pac HEAD:refs/for/pac-6.0
Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 6.63 KiB | 0 bytes/s, done.
Total 8 (delta 0), reused 0 (delta 0)
remote: Processing changes: refs: 1, done
To ssh://[email protected]:29418/android_vendor_pac
 ! [remote rejected] HEAD -> refs/for/pac-6.0 (no common ancestry)
error: failed to push some refs to 'ssh://[email protected]:29418/android_vendor_pac'

最佳答案

一个“容易”解决这个问题的例子是,如果你推到一个全新的回购协议,并且对任何可能使你的项目代码达到现在状态的旧git历史没有兴趣。
然后解决方案是从一个新文件夹开始,然后从gerrit克隆(空)项目。这个文件夹与这个gerrit项目有一个共同的祖先。然后,您可以使用git add将源文件添加到这个新文件夹中,直到满意为止(这项平凡的工作是不容易的),去掉任何旧的.git文件夹,最后尝试推送。这将把您的项目推到gerrit上,从现在开始使用git历史记录。

关于git - Gerrit不会 push 。错误:没有共同血统,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38066069/

10-13 05:32