How to create local git repository from git archive?

130 views Asked by At

Is it possible to recreate a git repository locally from the extracted content of a Github repository archive ?

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. I am looking to turn the content of this extracted archive into a local repository of the remote one and track its contents.

1

There are 1 answers

0
phd On

It is not, alas. The result of git archive contains neither commits nor other metadata.

The only way to track a remote repository is to clone it.