回购同步:![拒绝]android-q-preview-4->;android-q-preview-4(会破坏现有标签)

回购同步:![拒绝]android-q-preview-4->;android-q-preview-4(会破坏现有标签),android,git,terminal,android-source,repo,Android,Git,Terminal,Android Source,Repo,今天我对我的AOSP存储库执行了一个repo-sync,然后收到了一些错误。以下是我从终端收到的信息: From https://android.googlesource.com/platform/external/dtc ! [rejected] android-q-preview-1 -> android-q-preview-1 (would clobber existing tag) ! [rejected] android-q-preview-4


今天我对我的AOSP存储库执行了一个
repo-sync
,然后收到了一些错误。以下是我从终端收到的信息:

From https://android.googlesource.com/platform/external/dtc
 ! [rejected]        android-q-preview-1 -> android-q-preview-1  (would clobber existing tag)
 ! [rejected]        android-q-preview-4 -> android-q-preview-4  (would clobber existing tag)
 ! [rejected]        android-q-preview-5 -> android-q-preview-5  (would clobber existing tag)
 ! [rejected]        android-q-preview-6 -> android-q-preview-6  (would clobber existing tag)
error: Cannot fetch platform/external/dtc
warn: --force-broken, continuing to sync
我如何解决上述问题

谢谢。

看来“某人”已强制标签在公共项目中移动。。。tsk,tsk。无论如何,我也遇到了这个问题,我花了比我愿意承认的时间更长的时间才看到了显而易见的解决方案:只需从我的本地回购协议中删除有问题的标签。看起来是这样的:

$ repo forall -c "git tag -d android-q-preview-1 android-q-preview-4 android-q-preview-5 android-q-preview-6"

$ repo sync

YMMV

您的代码和存储库的代码存在一些问题。 使用此命令,您可能不会遇到更多问题:

repo sync -c -d --no-tags --force-sync

git推送--force@JianAstrero我做了git push--force,收到了这样一个消息:致命:没有一个git存储库(或者在挂载点/之前的任何父存储库)停在文件系统边界(没有设置git\u DISCOVERY\u跨文件系统)。您设置了上游吗?我想你没有