【问题标题】:What specifically does the AOSP repo tool checkout for each git repo?每个 git repo 的 AOSP repo 工具检查具体是什么?
【发布时间】:2013-11-21 22:38:28
【问题描述】:

使用来自 AOSP 的“repo”(用 python 编写)工具,当您使用它的“sync”命令时,根据我在这里读到的其他答案,例如 (How does the Android repo manifest repository work?),它将检查指定的分支该 git repo 的清单。

但这确实 与我在进入其中一个 git 本地存储库时实际看到的匹配,我得到:

aosp@aosp:/aosp/android-x86-jb42/bionic$ git branch 
* (no branch)

并且 .git/HEAD 包含一个 SHA 而不是分支引用路径的引用。 所以对我来说,它看起来更像是一个独立的头,但如果我手动执行此操作(检查特定提交),git branch 的结果将在输出中显示 sha1,而不仅仅是上面的“(无分支)”。

这是怎么回事?

【问题讨论】:

    标签: git android-source repository


    【解决方案1】:

    repo sync 相当于下面的 git 命令:

     git remote update
     git rebase origin/branch
    

    如果您想检查它在内部运行的命令,请使用 --trace 和 repo 命令。例如

    repo --trace sync 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-10-06
      • 1970-01-01
      • 1970-01-01
      • 2015-05-30
      • 1970-01-01
      • 1970-01-01
      • 2011-11-01
      相关资源
      最近更新 更多