如何像git-archive一样归档AOSP仓库? [英] How do I archive an AOSP repo like git-archive doing?

查看:103
本文介绍了如何像git-archive一样归档AOSP仓库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用此命令来归档git源代码:

I have used this command to archive a git source code:

git archive --format=tgz -o ~/myproj-20180402.tgz --prefix=myproj/ master

是否有相同/相似的方法来归档AOSP回购分支或标记.怎么做 ?任何帮助将不胜感激.

Are there same/similar way to archive a AOSP repo branch or tag. How to do ? Any help would be greatly appreciated.

推荐答案

AOSP代码不是单个 git 项目,实际上还有很多(数百个).因此,本身没有 git 命令.

AOSP code is not a single git project, it's actually many more (hundreds). So there is not a git command per-se.

您所能做的就是以这种方式使用仓库:

What you could do is use repo this way:

repo forall -j16 "<your-git-command-1; your-git-command-2>"

对于您建议的确切git命令,它将是:

So for the exact git command you proposed it would be:

repo forall -j16 "git archive --format=tgz -o ~/myproj-20180402.tgz --prefix=myproj/ master"

但是请记住,没有一个 单个 git 项目,因此您最终将拥有数百个存档,每个存档都位于其根目录下目录检查您同步的清单以获取完整的项目列表,以及它在本地的位置.

But keep in mind there is not a single git project, so you will end up with hundreds of archives, each inside it's root dir. Check the manifest you sync for a full list of projects and it's location locally.

这篇关于如何像git-archive一样归档AOSP仓库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆