简体   繁体   English

如何从git归档文件创建本地git存储库?

[英]How to create local git repository from git archive?

Is it possible to recreate a git repository locally from the extracted content of a Github repository archive ? 是否可以从Github存储库档案的提取内容中本地重新创建git存储库?

To add a little bit of context, my Android app downloads a git repository archive using DownloadManager and a Github repository archive link, then extracts it on the local storage of the device. 为了增加一点上下文,我的Android应用程序使用DownloadManager和Github存储库归档链接下载了一个git存储库归档,然后将其提取到设备的本地存储中。 I am looking to turn the content of this extracted archive into a local repository of the remote one and track its contents. 我希望将提取的存档的内容转换为远程数据库的本地存储库并跟踪其内容。

It is not, alas. not,不是。 The result of git archive contains neither commits nor other metadata. git archive的结果既不包含提交也不包含其他元数据。

The only way to track a remote repository is to clone it. 跟踪远程存储库的唯一方法是克隆它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM