【问题标题】:repo sync : ! [rejected] android-q-preview-4 -> android-q-preview-4 (would clobber existing tag)回购同步:! [拒绝] android-q-preview-4 -> android-q-preview-4(会破坏现有标签)
【发布时间】:2020-01-03 11:45:27
【问题描述】:


今天我对我的 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

我该如何解决上述问题?

谢谢。

【问题讨论】:

  • git push --force
  • @JianAstrero 我做了 git push --force 并收到了这个:致命的:不是 git 存储库(或任何到挂载点 / 的父级)停止在文件系统边界(未设置 GIT_DISCOVERY_ACROSS_FILESYSTEM)。
  • 你设置上游了吗?我想你还没有

标签: android git terminal android-source repo


【解决方案1】:

似乎“某人”已强制标签在公共项目中移动……啧啧啧。无论如何,我也遇到了这个问题,我承认看到明显的解决方案花了我更长的时间:只需从我的本地存储库中删除有问题的标签。看起来像这样:

$ 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

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

      猜你喜欢
      • 2019-11-06
      • 2023-03-27
      • 1970-01-01
      • 1970-01-01
      • 2020-02-09
      • 2014-08-20
      • 1970-01-01
      • 2016-11-11
      • 1970-01-01
      相关资源
      最近更新 更多