Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download only a working directory of the AOSP source code without the entire repo history?

The size of the latest AOSP source code is rather large (around 30-35 Gb for the .repo directory and another 15 Gb or so for the working directory). Is there a way to download only a snapshot of the latest version of the source code (official marshmallow release) without the entire repo history? That would save me a lot in bandwidth and storage.

like image 361
Phil Avatar asked Oct 10 '15 11:10

Phil


People also ask

What is the difference between Git clone and repo init?

git init vs.git clone is used to create a copy of an existing repository. Internally, git clone first calls git init to create a new repository. It then copies the data from the existing repository, and checks out a new set of working files. Learn more on the git clone page.

Does repo sync overwrite local changes?

repo sync does not overwrite local changes, so I don't think you're doing what you think you're doing. Can you give us a more detailed example of how you're using the command?


1 Answers

You can specify --depth 1 to git clone command. It will only get the latest snapshot.

like image 130
1615903 Avatar answered Oct 15 '22 02:10

1615903